diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9fd45e0..7d466fd 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,13 +10,19 @@ env: CARGO_TERM_COLOR: always jobs: - build: - + check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + # The Gitea runner image doesn't ship with Rust, unlike GitHub's. + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + - uses: Swatinem/rust-cache@v2 + - name: Format + run: cargo fmt --check + - name: Clippy + run: cargo clippy --all-targets -- -D warnings + - name: Test + run: cargo test