Skip to content

Commit ffcd5d5

Browse files
committed
nox refactoring and use --frozen in CI / testing scenarios
fixes #74
1 parent f7787f0 commit ffcd5d5

File tree

9 files changed

+14
-8
lines changed

9 files changed

+14
-8
lines changed

.github/workflows/nox.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ jobs:
5858
# mise sandbox --doctor
5959

6060
- name: nox
61-
run: mise exec -- uv run --only-group nox nox
61+
run: mise exec -- uv run --frozen --only-group nox nox

changelog.d/74.changed.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Use uv's `--frozen` in CI and testing scenarios to help ensure depedency updates are handled
2+
explicitly by the developer.
File renamed without changes.

gh-actions/nox-run/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ runs:
2323
- name: Run Nox Session
2424
shell: bash
2525
run: |
26-
uv run --only-group ${{ inputs.uv-group }} -- nox -s ${{ inputs.nox-session }}
26+
uv run --frozen --only-group ${{ inputs.uv-group }} -- nox -s ${{ inputs.nox-session }}

noxfile.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@
77
nox.options.default_venv_backend = 'uv'
88

99

10+
def uv_sync(session, group: str):
11+
session.run('uv', 'sync', '--active', '--frozen', '--only-group', group)
12+
13+
1014
@nox.session
1115
def tests(session: nox.Session):
12-
session.run('uv', 'sync', '--active', '--no-dev', '--group', 'tests')
16+
uv_sync(session, 'tests')
1317
session.run(
1418
'pytest',
1519
'-ra',
@@ -22,7 +26,7 @@ def tests(session: nox.Session):
2226

2327
@nox.session
2428
def standards(session: nox.Session):
25-
session.run('uv', 'sync', '--active', '--only-group', 'pre-commit')
29+
uv_sync(session, 'pre-commit')
2630
session.run(
2731
'pre-commit',
2832
'run',

src/tests/data/gh-nox.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333

3434
- name: Run Tests
3535
run: |
36-
uv run --only-group nox -- nox
36+
uv run --frozen --only-group nox -- nox

template/.github/workflows/{% if use_gh_nox %}nox.yaml{% endif %}.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ jobs:
3535

3636
- name: Run Tests
3737
run: |
38-
uv run --only-group nox -- nox
38+
uv run --frozen --only-group nox -- nox

template/noxfile.py.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ nox.options.default_venv_backend = 'uv'
88

99

1010
def uv_sync(session, group: str):
11-
session.run('uv', 'sync', '--active', '--no-default-groups', '--group', group)
11+
session.run('uv', 'sync', '--active', '--frozen', '--only-group', group)
1212

1313

1414
@nox.session

template/{% if use_circleci%}.circleci{% endif %}/config.yml.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- run:
3030
name: run nox
3131
command: |
32-
mise exec -- uv run --only-group nox nox
32+
mise exec -- uv run --frozen --only-group nox nox
3333

3434
- store_test_results:
3535
path: ci/test-reports/

0 commit comments

Comments
 (0)