Skip to content

Commit e8cdf62

Browse files
committed
Try using uv for check workflow
1 parent e58e507 commit e8cdf62

2 files changed

Lines changed: 15 additions & 10 deletions

File tree

.github/workflows/check.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,28 @@ jobs:
1717
uses: actions/setup-python@v5
1818
with:
1919
python-version: "3.12"
20-
cache: 'pip'
21-
cache-dependency-path: '**/pyproject.toml'
22-
- name: Install package with development dependencies
23-
run: pip install -e ".[dev]"
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v5
23+
with:
24+
enable-cache: true
25+
cache-dependency-glob: "pyproject.toml"
26+
27+
- name: Install package with dependencies
28+
run: uv sync --all-extras --dev
2429

2530
# check with ruff
2631
- name: Run ruff
27-
run: ruff check
32+
run: uv run ruff check
2833

2934
# check docs build
3035
- name: Check that documentation builds with no errors or warnings
31-
run: sphinx-build docs docs/_build --fail-on-warning
36+
run: uv run sphinx-build docs docs/_build --fail-on-warning
3237

3338
# check types with mypy
3439
- name: Check types in python src directory; install needed types
35-
run: mypy --install-types --non-interactive src
40+
run: uv run mypy --install-types --non-interactive src
3641

3742
# use treon to make sure that example notebooks run
3843
- name: Check jupyter notebooks with treon
39-
run: treon
44+
run: uv run treon

.github/workflows/unit_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ jobs:
2626
working-directory: .
2727

2828
steps:
29-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
3030

3131
# use github python action instead of uv to take advantage of caching
3232
- name: Set up Python ${{ matrix.python }}
33-
uses: actions/setup-python@v4
33+
uses: actions/setup-python@v5
3434
with:
3535
python-version: ${{ matrix.python }}
3636

0 commit comments

Comments
 (0)