@@ -12,13 +12,18 @@ concurrency:
1212 group : ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
1313 cancel-in-progress : true
1414
15+ defaults :
16+ run :
17+ shell : bash
18+
1519env :
1620 CARGO_INCREMENTAL : 0
1721 CARGO_NET_RETRY : 10
1822 CARGO_TERM_COLOR : always
1923 RUSTUP_MAX_RETRIES : 10
2024 PACKAGE_NAME : ruff
2125 PYTHON_VERSION : " 3.13"
26+ NEXTEST_PROFILE : ci
2227
2328jobs :
2429 determine_changes :
@@ -271,9 +276,6 @@ jobs:
271276 # This step is just to get nice GitHub annotations on the PR diff in the files-changed tab.
272277 run : cargo test -p ty_python_semantic --test mdtest || true
273278 - name : " Run tests"
274- shell : bash
275- env :
276- NEXTEST_PROFILE : " ci"
277279 run : cargo insta test --all-features --unreferenced reject --test-runner nextest
278280
279281 # Check for broken links in the documentation.
@@ -299,9 +301,13 @@ jobs:
299301
300302 cargo-test-linux-release :
301303 name : " cargo test (linux, release)"
302- runs-on : ${{ github.repository == 'astral-sh/ruff' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
304+ # release builds timeout on GitHub runners, so this job is just skipped on forks in the `if` check
305+ runs-on : depot-ubuntu-22.04-16
303306 needs : determine_changes
304- if : ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
307+ if : |
308+ github.repository == 'astral-sh/ruff' &&
309+ !contains(github.event.pull_request.labels.*.name, 'no-test') &&
310+ (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main')
305311 timeout-minutes : 20
306312 steps :
307313 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -325,9 +331,6 @@ jobs:
325331 with :
326332 enable-cache : " true"
327333 - name : " Run tests"
328- shell : bash
329- env :
330- NEXTEST_PROFILE : " ci"
331334 run : cargo insta test --release --all-features --unreferenced reject --test-runner nextest
332335
333336 cargo-test-windows :
@@ -352,9 +355,7 @@ jobs:
352355 with :
353356 enable-cache : " true"
354357 - name : " Run tests"
355- shell : bash
356358 env :
357- NEXTEST_PROFILE : " ci"
358359 # Workaround for <https://github.com/nextest-rs/nextest/issues/1493>.
359360 RUSTUP_WINDOWS_PATH_ADD_BIN : 1
360361 run : |
@@ -385,9 +386,6 @@ jobs:
385386 with :
386387 enable-cache : " true"
387388 - name : " Run tests"
388- shell : bash
389- env :
390- NEXTEST_PROFILE : " ci"
391389 run : |
392390 cargo nextest run --all-features --profile ci
393391 cargo test --all-features --doc
@@ -445,7 +443,6 @@ jobs:
445443 - name : " Install mold"
446444 uses : rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
447445 - name : " Build tests"
448- shell : bash
449446 env :
450447 MSRV : ${{ steps.msrv.outputs.value }}
451448 run : cargo "+${MSRV}" test --no-run --all-features
0 commit comments