Skip to content

Commit 0ea8ea2

Browse files
authored
Merge pull request #429 from sanders41/uv
Use frozen instead of locked for uv
2 parents 2b52ed4 + 14fbf19 commit 0ea8ea2

4 files changed

+7
-7
lines changed

src/github_actions.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ jobs:
172172
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
173173
uv-${{ runner.os }}
174174
- name: Install Dependencies
175-
run: uv sync --locked
175+
run: uv sync --frozen
176176
- name: Ruff format check
177177
run: uv run ruff format {source_dir} tests --check
178178
- name: Lint with ruff
@@ -204,7 +204,7 @@ jobs:
204204
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
205205
uv-${{ runner.os }}
206206
- name: Install Dependencies
207-
run: uv sync --locked
207+
run: uv sync --frozen
208208
- name: Test with pytest
209209
run: uv run pytest
210210
- name: Minimize uv cache
@@ -593,7 +593,7 @@ jobs:
593593
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
594594
uv-${{ runner.os }}
595595
- name: Install Dependencies
596-
run: uv sync --locked
596+
run: uv sync --frozen
597597
- name: Ruff format check
598598
run: uv run ruff format {source_dir} tests --check
599599
- name: Lint with ruff
@@ -631,7 +631,7 @@ jobs:
631631
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
632632
uv-${{ runner.os }}
633633
- name: Install Dependencies
634-
run: uv sync --locked
634+
run: uv sync --frozen
635635
- name: Test with pytest
636636
run: uv run pytest
637637
- name: Minimize uv cache

src/project_generator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ fn create_uv_justfile(module: &str) -> String {
657657
uv lock
658658
659659
@install:
660-
uv sync --locked --all-extras
660+
uv sync --frozen --all-extras
661661
"#
662662
)
663663
}

src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
source: src/github_actions.rs
33
expression: content
44
---
5-
"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n UV_CACHE_DIR: /tmp/.uv-cache\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - name: Install uv\n run: curl -LsSf https://astral.sh/uv/install.sh | sh\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: \"3.9\"\n - name: Restore uv cache\n uses: actions/cache@v4\n with:\n path: ${ env.UV_CACHE_DIR }\n key: uv-${ runner.os }-${ hashFiles('uv.lock') }\n restore-keys: |\n uv-${ runner.os }-${ hashFiles('uv.lock') }\n uv-${ runner.os }\n - name: Install Dependencies\n run: uv sync --locked\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy .\n - name: Minimize uv cache\n run: uv cache prune --ci\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.9\", \"3.10\", \"3.11\", \"3.12\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - name: Install uv\n run: curl -LsSf https://astral.sh/uv/install.sh | sh\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v5\n with:\n python-version: ${{ matrix.python-version }}\n - name: Restore uv cache\n uses: actions/cache@v4\n with:\n path: ${ env.UV_CACHE_DIR }\n key: uv-${ runner.os }-${ hashFiles('uv.lock') }\n restore-keys: |\n uv-${ runner.os }-${ hashFiles('uv.lock') }\n uv-${ runner.os }\n - name: Install Dependencies\n run: uv sync --locked\n - name: Test with pytest\n run: uv run pytest\n - name: Minimize uv cache\n run: uv cache prune --ci\n"
5+
"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n UV_CACHE_DIR: /tmp/.uv-cache\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - name: Install uv\n run: curl -LsSf https://astral.sh/uv/install.sh | sh\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: \"3.9\"\n - name: Restore uv cache\n uses: actions/cache@v4\n with:\n path: ${ env.UV_CACHE_DIR }\n key: uv-${ runner.os }-${ hashFiles('uv.lock') }\n restore-keys: |\n uv-${ runner.os }-${ hashFiles('uv.lock') }\n uv-${ runner.os }\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy .\n - name: Minimize uv cache\n run: uv cache prune --ci\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.9\", \"3.10\", \"3.11\", \"3.12\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - name: Install uv\n run: curl -LsSf https://astral.sh/uv/install.sh | sh\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v5\n with:\n python-version: ${{ matrix.python-version }}\n - name: Restore uv cache\n uses: actions/cache@v4\n with:\n path: ${ env.UV_CACHE_DIR }\n key: uv-${ runner.os }-${ hashFiles('uv.lock') }\n restore-keys: |\n uv-${ runner.os }-${ hashFiles('uv.lock') }\n uv-${ runner.os }\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n - name: Minimize uv cache\n run: uv cache prune --ci\n"

src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_multi_os_file.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
source: src/github_actions.rs
33
expression: content
44
---
5-
"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n UV_CACHE_DIR: /tmp/.uv-cache\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - name: Install uv\n run: curl -LsSf https://astral.sh/uv/install.sh | sh\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: \"3.9\"\n - name: Restore uv cache\n uses: actions/cache@v4\n with:\n path: ${ env.UV_CACHE_DIR }\n key: uv-${ runner.os }-${ hashFiles('uv.lock') }\n restore-keys: |\n uv-${ runner.os }-${ hashFiles('uv.lock') }\n uv-${ runner.os }\n - name: Install Dependencies\n run: uv sync --locked\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy .\n - name: Minimize uv cache\n run: uv cache prune --ci\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.9\", \"3.10\", \"3.11\", \"3.12\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v4\n - name: Set up uv ubuntu/mac\n if: ${ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }\n run: curl -LsSf https://astral.sh/uv/install.sh | sh\n - name: Set up uv windows\n if: ${ matrix.os == 'windows-latest' }\n run: irm https://astral.sh/uv/install.ps1 | iex\n shell: powershell\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v5\n with:\n python-version: ${{ matrix.python-version }}\n - name: Restore uv cache\n uses: actions/cache@v4\n with:\n path: ${ env.UV_CACHE_DIR }\n key: uv-${ runner.os }-${ hashFiles('uv.lock') }\n restore-keys: |\n uv-${ runner.os }-${ hashFiles('uv.lock') }\n uv-${ runner.os }\n - name: Install Dependencies\n run: uv sync --locked\n - name: Test with pytest\n run: uv run pytest\n - name: Minimize uv cache\n run: uv cache prune --ci\n"
5+
"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n UV_CACHE_DIR: /tmp/.uv-cache\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - name: Install uv\n run: curl -LsSf https://astral.sh/uv/install.sh | sh\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: \"3.9\"\n - name: Restore uv cache\n uses: actions/cache@v4\n with:\n path: ${ env.UV_CACHE_DIR }\n key: uv-${ runner.os }-${ hashFiles('uv.lock') }\n restore-keys: |\n uv-${ runner.os }-${ hashFiles('uv.lock') }\n uv-${ runner.os }\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy .\n - name: Minimize uv cache\n run: uv cache prune --ci\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.9\", \"3.10\", \"3.11\", \"3.12\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v4\n - name: Set up uv ubuntu/mac\n if: ${ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }\n run: curl -LsSf https://astral.sh/uv/install.sh | sh\n - name: Set up uv windows\n if: ${ matrix.os == 'windows-latest' }\n run: irm https://astral.sh/uv/install.ps1 | iex\n shell: powershell\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v5\n with:\n python-version: ${{ matrix.python-version }}\n - name: Restore uv cache\n uses: actions/cache@v4\n with:\n path: ${ env.UV_CACHE_DIR }\n key: uv-${ runner.os }-${ hashFiles('uv.lock') }\n restore-keys: |\n uv-${ runner.os }-${ hashFiles('uv.lock') }\n uv-${ runner.os }\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n - name: Minimize uv cache\n run: uv cache prune --ci\n"

0 commit comments

Comments
 (0)