Skip to content

Commit 32b91d8

Browse files
committed
Use justfile commands in CI.
1 parent 5431aaf commit 32b91d8

3 files changed

Lines changed: 14 additions & 24 deletions

File tree

.github/workflows/main.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ jobs:
2525
- uses: astral-sh/setup-uv@v6
2626
with:
2727
enable-cache: true
28-
- run: uv run --no-dev --group typing mypy
29-
- run: uv run --no-dev --group typing nbqa mypy --ignore-missing-imports .
28+
- name: Install just
29+
uses: extractions/setup-just@v2
30+
- run: just typing
31+
- run: just typing-nb
3032

3133
run-tests:
3234

@@ -43,8 +45,10 @@ jobs:
4345
- uses: actions/checkout@v4
4446
- uses: astral-sh/setup-uv@v6
4547
with:
46-
python-version: ${{ matrix.python-version }}
4748
enable-cache: true
49+
python-version: ${{ matrix.python-version }}
50+
- name: Install just
51+
uses: extractions/setup-just@v2
4852

4953
- if: matrix.os == 'ubuntu-latest'
5054
run: |
@@ -53,15 +57,15 @@ jobs:
5357
5458
- name: Run tests, doctests, and notebook tests
5559
shell: bash -l {0}
56-
run: uv run --group test pytest --nbmake --cov=src --cov=tests --cov-report=xml -n auto
60+
run: just test-cov
5761

5862
- name: Upload test coverage reports to Codecov with GitHub Action
5963
uses: codecov/codecov-action@v5
6064

6165
- name: Run tests with lowest resolution
6266
if: matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
63-
run: uv run --group test --resolution lowest-direct pytest --nbmake -n auto
67+
run: just test-lowest
6468

6569
- name: Run tests with highest resolution
6670
if: matrix.python-version == '3.13' && matrix.os == 'ubuntu-latest'
67-
run: uv run --group test --resolution highest pytest --nbmake -n auto
71+
run: just test-highest

.pre-commit-config.yaml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
ci:
2-
skip: [type-checking]
3-
41
repos:
52
- repo: https://github.com/pre-commit/pre-commit-hooks
63
rev: v5.0.0
@@ -31,7 +28,7 @@ repos:
3128
rev: v0.12.4
3229
hooks:
3330
- id: ruff-format
34-
- id: ruff
31+
- id: ruff-check
3532
- repo: https://github.com/executablebooks/mdformat
3633
rev: 0.7.22
3734
hooks:
@@ -58,7 +55,7 @@ repos:
5855
- id: nbstripout
5956
exclude: (docs)
6057
- repo: https://github.com/crate-ci/typos
61-
rev: v1
58+
rev: v1.34.0
6259
hooks:
6360
- id: typos
6461
exclude: (\.ipynb)
@@ -67,10 +64,3 @@ repos:
6764
- id: check-hooks-apply
6865
- id: check-useless-excludes
6966
# - id: identity # Prints all files passed to pre-commits. Debugging.
70-
- repo: local
71-
hooks:
72-
- id: type-checking
73-
name: type-checking
74-
entry: uv run --group typing mypy
75-
language: system
76-
pass_filenames: false

justfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# Default recipe to display available commands
2-
default:
3-
@just --list
4-
51
# Install all dependencies
62
install:
73
uv sync --all-groups
@@ -20,11 +16,11 @@ test-nb:
2016

2117
# Run type checking
2218
typing:
23-
uv run --group typing mypy check
19+
uv run --group typing --isolated mypy
2420

2521
# Run type checking on notebooks
2622
typing-nb:
27-
uv run --group typing nbqa mypy --ignore-missing-imports .
23+
uv run --group typing --isolated nbqa mypy --ignore-missing-imports
2824

2925
# Run linting
3026
lint:

0 commit comments

Comments
 (0)