Skip to content

Commit 1318b1e

Browse files
Merge pull request #2399 from VWS-Python/setup-uv
Use setup-uv GitHub Action
2 parents f500f4f + b11da61 commit 1318b1e

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,17 @@ jobs:
2828
- name: Install uv
2929
uses: astral-sh/setup-uv@v3
3030

31-
- name: Install Python
32-
run: uv python install ${{ matrix.python-version }}
33-
3431
- name: "Lint"
3532
run: |
36-
uv run --all-extras pre-commit run --all-files --hook-stage commit --verbose
37-
uv run --all-extras pre-commit run --all-files --hook-stage push --verbose
38-
uv run --all-extras pre-commit run --all-files --hook-stage manual --verbose
33+
uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage commit --verbose
34+
uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage push --verbose
35+
uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage manual --verbose
3936
4037
- name: "Run tests"
4138
run: |
4239
# We run tests against "." and not the tests directory as we test the README
4340
# and documentation.
44-
uv run --all-extras pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml
41+
uv run --all-extras --python=${{ matrix.python-version }} pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests/ . --cov-report=xml
4542
4643
- name: "Upload coverage to Codecov"
4744
uses: "codecov/codecov-action@v4"

.github/workflows/release.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ jobs:
3434
- name: Install uv
3535
uses: astral-sh/setup-uv@v3
3636

37-
- name: Install Python
38-
run: uv python install ${{ matrix.python-version }}
39-
4037
- name: "Calver calculate version"
4138
uses: StephaneBour/actions-calver@master
4239
id: calver
@@ -80,8 +77,7 @@ jobs:
8077
run: |
8178
git fetch --tags
8279
git checkout ${{ steps.tag_version.outputs.new_tag }}
83-
uv run pip install build check-wheel-contents
84-
uv run python -m build --sdist --wheel --outdir dist/ .
80+
uv run --extra=release python -m build --sdist --wheel --outdir dist/ .
8581
uv run check-wheel-contents dist/*.whl
8682
8783
# We use PyPI trusted publishing rather than a PyPI API token.

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ optional-dependencies.dev = [
7676
"vws-python-mock==2024.8.30",
7777
"vws-test-fixtures==2023.3.5",
7878
]
79+
optional-dependencies.release = [ "build", "check-wheel-contents" ]
7980
urls.Documentation = "https://vws-python.readthedocs.io/en/latest/"
8081
urls.Source = "https://github.com/VWS-Python/vws-python"
8182

@@ -286,6 +287,7 @@ ignore = [
286287
[tool.deptry]
287288
pep621_dev_dependency_groups = [
288289
"dev",
290+
"release",
289291
]
290292

291293
[tool.pyproject-fmt]

0 commit comments

Comments
 (0)