|
15 | 15 | CARGO_PROFILE_TEST_DEBUG: 0
|
16 | 16 |
|
17 | 17 | jobs:
|
18 |
| - lint: |
| 18 | + cargo-fmt: |
| 19 | + name: Cargo fmt |
19 | 20 | runs-on: ubuntu-latest
|
20 |
| - timeout-minutes: 5 |
21 | 21 |
|
22 | 22 | steps:
|
23 |
| - - name: Checkout project |
| 23 | + - name: Fetch Repository |
24 | 24 | uses: actions/checkout@v4
|
25 | 25 |
|
26 |
| - - name: Setup Rust |
27 |
| - uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 |
| 26 | + - name: Install stable toolchain |
| 27 | + uses: actions-rust-lang/setup-rust-toolchain@v1 |
28 | 28 | with:
|
29 | 29 | toolchain: stable
|
30 |
| - components: clippy, rustfmt |
| 30 | + components: rustfmt |
31 | 31 |
|
32 | 32 | - name: Caching
|
33 |
| - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 |
| 33 | + uses: Swatinem/rust-cache@v2 |
34 | 34 | with:
|
35 | 35 | cache-all-crates: true
|
36 | 36 | save-if: ${{ github.ref == 'refs/heads/master' }}
|
37 |
| - cache-provider: 'github' |
| 37 | + cache-provider: "github" |
38 | 38 |
|
39 |
| - - name: Run linter |
40 |
| - uses: giraffate/clippy-action@871cc4173f2594435c7ea6b0bce499cf6c2164a1 |
| 39 | + - name: Rustfmt Check |
| 40 | + run: cargo fmt --all --check |
| 41 | + |
| 42 | + cargo-clippy: |
| 43 | + name: Cargo clippy |
| 44 | + runs-on: ubuntu-latest |
| 45 | + |
| 46 | + steps: |
| 47 | + - name: Fetch Repository |
| 48 | + uses: actions/checkout@v4 |
| 49 | + |
| 50 | + - name: Install stable toolchain |
| 51 | + uses: actions-rust-lang/setup-rust-toolchain@v1 |
41 | 52 | with:
|
42 |
| - github_token: ${{ secrets.GITHUB_TOKEN }} |
43 |
| - clippy_flags: --all-features -- -D warnings |
44 |
| - reporter: github-pr-review |
| 53 | + components: clippy |
45 | 54 |
|
46 |
| - - name: Run formatter |
47 |
| - run: cargo fmt --all -- --check |
| 55 | + - name: Caching |
| 56 | + uses: Swatinem/rust-cache@v2 |
| 57 | + with: |
| 58 | + cache-all-crates: true |
| 59 | + save-if: ${{ github.ref == 'refs/heads/master' }} |
| 60 | + cache-provider: "github" |
48 | 61 |
|
49 |
| - test: |
50 |
| - needs: lint |
| 62 | + - name: Clippy Check |
| 63 | + run: cargo clippy --workspace --all-targets --all-features -- -Dwarnings |
| 64 | + |
| 65 | + cargo-test: |
| 66 | + name: Cargo test |
51 | 67 | runs-on: ubuntu-latest
|
52 |
| - timeout-minutes: 10 |
53 | 68 |
|
54 | 69 | steps:
|
55 |
| - - name: Checkout project |
| 70 | + - name: Fetch Repository |
56 | 71 | uses: actions/checkout@v4
|
57 | 72 |
|
58 |
| - - name: Setup Rust |
59 |
| - uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 |
| 73 | + - name: Install stable toolchain |
| 74 | + uses: actions-rust-lang/setup-rust-toolchain@v1 |
60 | 75 |
|
61 | 76 | - name: Caching
|
62 |
| - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 |
| 77 | + uses: Swatinem/rust-cache@v2 |
63 | 78 | with:
|
64 | 79 | cache-all-crates: true
|
65 | 80 | save-if: ${{ github.ref == 'refs/heads/master' }}
|
66 |
| - cache-provider: 'github' |
| 81 | + cache-provider: "github" |
67 | 82 |
|
68 |
| - - name: Install nextest |
69 |
| - uses: taiki-e/install-action@9903ab6feadaec33945de535fe9d181b91802a55 |
70 |
| - with: |
71 |
| - tool: nextest |
| 83 | + - name: Install latest nextest release |
| 84 | + uses: taiki-e/install-action@nextest |
72 | 85 |
|
73 |
| - - name: Run tests |
74 |
| - run: cargo nextest run --all-features |
| 86 | + - name: Test with latest nextest release |
| 87 | + uses: actions-rs/cargo@v1 |
| 88 | + with: |
| 89 | + command: nextest |
| 90 | + args: run |
0 commit comments