rs-basic/.gitea/workflows/cargo.yaml

53 lines
1.1 KiB
YAML

name: Rust / Cargo
on:
push:
branches:
- master
pull_request:
jobs:
lint:
name: Lint
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Rust
uses: ATiltedTree/setup-rust@v1
with:
rust-version: stable
components: clippy
- name: Build | Lint
run: cargo clippy
compile:
name: Compile
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Rust
uses: ATiltedTree/setup-rust@v1
with:
rust-version: stable
- name: Build | Compile
run: cargo check
test:
name: Test
strategy:
matrix:
rust:
- stable
- beta
- nightly
runs-on: ${{ matrix.os }}
needs: [compile]
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Rust
uses: ATiltedTree/setup-rust@v1
with:
rust-version: ${{ matrix.rust }}
- name: Build | Compile
run: cargo test