|
24 | 24 | changes: |
25 | 25 | name: Filter changes |
26 | 26 | runs-on: ubuntu-22.04 |
| 27 | + if: ${{ github.event_name != 'merge_group' }} |
27 | 28 | # Set job outputs to values from filter step |
28 | 29 | outputs: |
29 | 30 | rust: ${{ steps.filter.outputs.rust || 'true' }} |
|
42 | 43 | - 'crates/**' |
43 | 44 | - 'plugins/**' |
44 | 45 | - 'Cargo.*' |
| 46 | + - '**/Cargo.toml' |
45 | 47 | workflows: |
46 | 48 | - '.github/workflows/**' |
47 | 49 | docs: |
|
53 | 55 | check-lockfile-uptodate: |
54 | 56 | name: Check whether Cargo.lock is up to date |
55 | 57 | runs-on: ubuntu-22.04 |
56 | | - if: ${{ github.event_name == 'pull_request' }} |
57 | | - outputs: |
58 | | - locks: ${{ steps.filter.outputs.locks }} |
| 58 | + needs: changes |
| 59 | + if: ${{ needs.changes.outputs.rust == 'true' || needs.changes.outputs.workflows == 'true' }} |
59 | 60 | steps: |
60 | 61 | - uses: actions/checkout@v4 |
61 | 62 |
|
|
74 | 75 |
|
75 | 76 | - uses: Swatinem/rust-cache@v2 |
76 | 77 |
|
77 | | - - uses: dorny/paths-filter@v3 |
78 | | - id: filter |
79 | | - with: |
80 | | - filters: | |
81 | | - locks: |
82 | | - - '**/Cargo.toml' |
83 | | -
|
84 | 78 | - name: Check whether lockfile is up to date |
85 | | - if: steps.filter.outputs.locks == 'true' |
86 | 79 | run: cargo check --locked |
87 | 80 |
|
88 | 81 | udeps: |
@@ -253,65 +246,6 @@ jobs: |
253 | 246 | - name: Run `cargo check` |
254 | 247 | run: cargo check --all-targets --all-features |
255 | 248 |
|
256 | | - cargo-test: |
257 | | - name: Run cargo test |
258 | | - runs-on: ubuntu-22.04 |
259 | | - needs: changes |
260 | | - if: ${{ needs.changes.outputs.rust == 'true' || needs.changes.outputs.workflows == 'true' }} |
261 | | - steps: |
262 | | - - name: Check disk space before setting up |
263 | | - run: df -BM |
264 | | - |
265 | | - - name: Reclaim some disk space |
266 | | - run: | |
267 | | - sudo rm -rf /usr/share/dotnet |
268 | | - sudo rm -rf /opt/ghc |
269 | | - sudo rm -rf "/usr/local/share/boost" |
270 | | - sudo rm -rf /opt/hostedtoolcache |
271 | | -
|
272 | | - - name: Check disk space after freeing |
273 | | - run: df -BM |
274 | | - |
275 | | - - name: Checkout |
276 | | - uses: actions/checkout@v4 |
277 | | - |
278 | | - - name: Retrieve MSRV from workspace Cargo.toml |
279 | | - id: rust_version |
280 | | - |
281 | | - with: |
282 | | - file: Cargo.toml |
283 | | - field: "workspace.package.rust-version" |
284 | | - |
285 | | - - name: Enable toolchain via github action |
286 | | - uses: dtolnay/rust-toolchain@stable |
287 | | - with: |
288 | | - components: llvm-tools-preview |
289 | | - |
290 | | - - name: Enable cache |
291 | | - uses: Swatinem/rust-cache@v2 |
292 | | - |
293 | | - - name: Install latest nextest release |
294 | | - uses: taiki-e/install-action@nextest |
295 | | - |
296 | | - - name: cargo install cargo-llvm-cov |
297 | | - uses: taiki-e/install-action@cargo-llvm-cov |
298 | | - |
299 | | - - name: cargo llvm-cov |
300 | | - run: cargo llvm-cov nextest --no-fail-fast --locked --all-features --all-targets --codecov --output-path codecov.json |
301 | | - |
302 | | - # https://github.com/rust-lang/cargo/issues/6669 |
303 | | - - name: cargo test --doc |
304 | | - run: cargo test --locked --all-features --doc |
305 | | - |
306 | | - - name: Upload to codecov.io |
307 | | - uses: codecov/codecov-action@v5 |
308 | | - with: |
309 | | - token: ${{ secrets.CODECOV_TOKEN }} |
310 | | - fail_ci_if_error: false |
311 | | - |
312 | | - - name: Check disk space after completing workflow |
313 | | - run: df -BM |
314 | | - |
315 | 249 | shellcheck: |
316 | 250 | name: Shellcheck |
317 | 251 | runs-on: ubuntu-latest |
|
0 commit comments