diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 682413e..2e86512 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -9,8 +9,8 @@ on: workflow_dispatch: jobs: - extract-toolchain: - name: extract toolchain + toolchain: + name: Toolchain runs-on: ubuntu-latest outputs: toolchain: ${{ steps.toolchain.outputs.value }} @@ -24,11 +24,11 @@ jobs: - run: echo "toolchain=${{ steps.toolchain.outputs.value || 'stable' }}" >> $GITHUB_OUTPUT clippy: - name: cargo clippy + name: Clippy runs-on: ubuntu-latest - needs: extract-toolchain + needs: toolchain env: - TOOLCHAIN: ${{ needs.extract-toolchain.outputs.toolchain }} + TOOLCHAIN: ${{ needs.toolchain.outputs.toolchain }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master @@ -38,28 +38,28 @@ jobs: - uses: swatinem/rust-cache@v2 - run: cargo clippy -- -D warnings - test: - name: cargo test - needs: extract-toolchain + fmt: + name: Formatting runs-on: ubuntu-latest - env: - TOOLCHAIN: ${{ needs.extract-toolchain.outputs.toolchain }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: ${{ env.TOOLCHAIN }} + toolchain: nightly + components: rustfmt - uses: swatinem/rust-cache@v2 - - run: cargo test + - run: cargo +nightly fmt --all -- --check - fmt: - name: cargo fmt + test: + name: Test + needs: toolchain runs-on: ubuntu-latest + env: + TOOLCHAIN: ${{ needs.toolchain.outputs.toolchain }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly - components: rustfmt + toolchain: ${{ env.TOOLCHAIN }} - uses: swatinem/rust-cache@v2 - - run: cargo fmt --all -- --check + - run: cargo test