Skip to content

Commit 14066c0

Browse files
committed
cicd: use uv in github actions
1 parent 9a3ce7f commit 14066c0

File tree

1 file changed

+21
-8
lines changed
  • python/{{cookiecutter.project_slug}}/.github/workflows

1 file changed

+21
-8
lines changed

python/{{cookiecutter.project_slug}}/.github/workflows/checks.yaml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,17 @@ jobs:
1515
with:
1616
python-version: {{ "${{ matrix.python-version }}" }}
1717

18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v6
20+
with:
21+
enable-cache: true
22+
1823
- name: Install dependencies
1924
run: |
20-
python3 -m pip install ".[tests]"
25+
run: uv sync --extra tests
2126

2227
- name: Run tests
23-
run: python3 -m pytest
28+
run: uv run pytest
2429

2530
lint:
2631
name: lint
@@ -33,11 +38,16 @@ jobs:
3338
with:
3439
python-version: "3.11"
3540

41+
- name: Install uv
42+
uses: astral-sh/setup-uv@v6
43+
with:
44+
enable-cache: true
45+
3646
- name: Install dependencies
37-
run: python3 -m pip install ".[dev]"
47+
run: uv sync --extra dev
3848

3949
- name: Check style
40-
run: python3 -m ruff check . && python3 -m ruff format --check .
50+
run: uv run ruff check && uv run ruff format --check
4151

4252
precommit_hooks:
4353
runs-on: ubuntu-latest
@@ -72,12 +82,15 @@ jobs:
7282
with:
7383
python-version: 3.11
7484

85+
- name: Install uv
86+
uses: astral-sh/setup-uv@v6
87+
with:
88+
enable-cache: true
89+
7590
- name: Install dependencies
76-
run: |
77-
python3 -m pip install --upgrade pip
78-
python3 -m pip install '.[docs]'
91+
run: uv sync --extra docs
7992

8093
- name: Attempt docs build
8194
working-directory: ./docs
82-
run: make html
95+
run: source ../.venv/bin/activate && make html
8396
{% endif %}

0 commit comments

Comments
 (0)