Skip to content

Commit 8e66b24

Browse files
committed
CI: Update uv
1 parent b28f5a1 commit 8e66b24

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

.github/actions/install-aiida-core/action.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@ inputs:
77
default: '3.9' # Lowest supported version
88
required: false
99
extras:
10-
description: aiida-core extras (including brackets)
11-
default: ''
10+
description: list of optional dependencies
11+
# NOTE: The default 'pre-commit' extra recursively contains
12+
# other extras needed to run the tests.
13+
default: pre-commit
1214
required: false
1315
# NOTE: Hard-learned lesson: we cannot use type=boolean here, apparently :-(
1416
# https://stackoverflow.com/a/76294014
1517
# NOTE2: When installing from lockfile, aiida-core and its dependencies
1618
# are installed in a virtual environment located in .venv directory.
1719
# Subsuquent jobs steps must either activate the environment or use `uv run`
1820
from-lock:
19-
description: Install aiida-core dependencies from a uv lock file
21+
description: Install aiida-core dependencies from uv lock file
2022
default: 'true'
2123
required: false
2224

@@ -29,19 +31,18 @@ runs:
2931
python-version: ${{ inputs.python-version }}
3032

3133
- name: Set up uv
32-
uses: astral-sh/setup-uv@v4
34+
uses: astral-sh/setup-uv@v5
3335
with:
34-
version: 0.5.6
36+
version: 0.5.x
37+
python-version: ${{ inputs.python-version }}
3538

3639
- name: Install dependencies from uv lock
3740
if: ${{ inputs.from-lock == 'true' }}
3841
# NOTE: We're asserting that the lockfile is up to date
39-
# NOTE2: 'pre-commit' extra recursively contains other extras
40-
# needed to run the tests.
41-
run: uv sync --locked --extra pre-commit
42+
run: uv sync --locked --extra ${{ inputs.extras }}
4243
shell: bash
4344

4445
- name: Install aiida-core
4546
if: ${{ inputs.from-lock != 'true' }}
46-
run: uv pip install --system -e .${{ inputs.extras }}
47+
run: uv pip install -e .${{ inputs.extras }}
4748
shell: bash

.github/workflows/test-install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
run: uv pip install --system -r utils/requirements.txt
4444

4545
- name: Validate uv lockfile
46-
run: uv lock --locked
46+
run: uv lock --check
4747

4848
- name: Validate conda environment file
4949
run: python ./utils/dependency_management.py validate-environment-yml

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,13 @@ repos:
191191
- id: check-uv-lock
192192
name: Check uv lockfile up to date
193193
# NOTE: This will not automatically update the lockfile
194-
entry: uv lock --locked
194+
entry: uv lock --check
195195
language: system
196196
pass_filenames: false
197197
files: >-
198198
(?x)^(
199199
pyproject.toml|
200+
uv.lock|
200201
)$
201202
202203
- id: generate-conda-environment

0 commit comments

Comments
 (0)