Skip to content

Commit 056ce07

Browse files
authored
Add UV_LOCKED to all workflows (#28261)
Signed-off-by: William Woodruff <[email protected]>
1 parent 6d6e35d commit 056ce07

22 files changed

Lines changed: 178 additions & 74 deletions

‎.github/workflows/build-binaries.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ concurrency:
2727
permissions: {}
2828

2929
env:
30+
UV_LOCKED: 1
3031
ACTIONS_CACHE_MODE: none
3132
PACKAGE_NAME: ruff
3233
MODULE_NAME: ruff

‎.github/workflows/build-docker.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
- .github/workflows/build-docker.yml
1919

2020
env:
21+
UV_LOCKED: 1
2122
ACTIONS_CACHE_MODE: none
2223
RUFF_BASE_IMG: ghcr.io/${{ github.repository_owner }}/ruff
2324

‎.github/workflows/build-wasm.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ concurrency:
2121
permissions: {}
2222

2323
env:
24+
UV_LOCKED: 1
2425
ACTIONS_CACHE_MODE: none
2526
CARGO_INCREMENTAL: 0
2627
CARGO_NET_RETRY: 10

‎.github/workflows/ci.yaml‎

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ defaults:
1717
shell: bash
1818

1919
env:
20+
UV_LOCKED: 1
2021
CARGO_INCREMENTAL: 0
2122
CARGO_NET_RETRY: 10
2223
CARGO_PROFILE_DEV_LTO: "false"
@@ -404,7 +405,10 @@ jobs:
404405
# This step is just to get nice GitHub annotations on the PR diff in the files-changed tab.
405406
run: cargo test -p ty_python_semantic --test mdtest || true
406407
- name: "Run tests"
407-
run: uv run --only-dev cargo insta test --all-features --unreferenced reject --test-runner nextest --disable-nextest-doctest
408+
env:
409+
# Tests create disposable uv projects that must be resolved without a lockfile.
410+
UV_LOCKED: 0
411+
run: uv run --locked --only-dev cargo insta test --all-features --unreferenced reject --test-runner nextest --disable-nextest-doctest
408412
- name: "Run doctests"
409413
run: cargo test --doc --all-features
410414
- name: Dogfood ty on py-fuzzer
@@ -460,7 +464,10 @@ jobs:
460464
version: "0.12.9"
461465
enable-cache: "true"
462466
- name: "Run tests"
463-
run: uv run --only-dev cargo nextest run --cargo-profile profiling --all-features
467+
env:
468+
# Tests create disposable uv projects that must be resolved without a lockfile.
469+
UV_LOCKED: 0
470+
run: uv run --locked --only-dev cargo nextest run --cargo-profile profiling --all-features
464471
- name: "Run doctests"
465472
run: cargo test --doc --profile profiling --all-features
466473

@@ -495,8 +502,11 @@ jobs:
495502
version: "0.12.9"
496503
enable-cache: "true"
497504
- name: "Run tests"
505+
env:
506+
# Tests create disposable uv projects that must be resolved without a lockfile.
507+
UV_LOCKED: 0
498508
run: |
499-
uv run --only-dev cargo nextest run --all-features --profile ci
509+
uv run --locked --only-dev cargo nextest run --all-features --profile ci
500510
cargo test --all-features --doc
501511
502512
cargo-test-wasm:
@@ -1379,9 +1389,11 @@ jobs:
13791389
# appear to provide much useful insight for our walltime benchmarks right now
13801390
# (see https://github.com/astral-sh/ruff/pull/20419)
13811391
CODSPEED_PERF_ENABLED: false
1392+
# Benchmarks manage any disposable uv environments they create.
1393+
UV_LOCKED: 0
13821394
with:
13831395
mode: walltime
1384-
run: uv run --only-dev cargo codspeed run --bench "${{ matrix.benchmark.target }}" -m walltime "${{ matrix.benchmark.filter }}"
1396+
run: uv run --locked --only-dev cargo codspeed run --bench "${{ matrix.benchmark.target }}" -m walltime "${{ matrix.benchmark.filter }}"
13851397

13861398
required-checks-passed:
13871399
name: "all required checks passed"

‎.github/workflows/daily_fuzz.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ concurrency:
1616
cancel-in-progress: true
1717

1818
env:
19+
UV_LOCKED: 1
1920
CARGO_INCREMENTAL: 0
2021
CARGO_NET_RETRY: 10
2122
CARGO_TERM_COLOR: always

‎.github/workflows/memory_report.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ concurrency:
3030
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3131

3232
env:
33+
UV_LOCKED: 1
3334
CARGO_INCREMENTAL: 0
3435
CARGO_NET_RETRY: 10
3536
CARGO_TERM_COLOR: always

‎.github/workflows/notify-dependents.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
type: string
1313

1414
env:
15+
UV_LOCKED: 1
1516
ACTIONS_CACHE_MODE: none
1617

1718
jobs:

‎.github/workflows/publish-crates.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
type: string
1313

1414
env:
15+
UV_LOCKED: 1
1516
ACTIONS_CACHE_MODE: none
1617

1718
jobs:

‎.github/workflows/publish-docs.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ permissions:
2121
contents: read
2222

2323
env:
24+
UV_LOCKED: 1
2425
ACTIONS_CACHE_MODE: none
2526
CARGO_PROFILE_DEV_LTO: "false"
2627
CARGO_PROFILE_DEV_OPT_LEVEL: 0

‎.github/workflows/publish-mirror.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
permissions: {}
1414

1515
env:
16+
UV_LOCKED: 1
1617
ACTIONS_CACHE_MODE: none
1718

1819
jobs:

0 commit comments

Comments
 (0)