Skip to content

Commit 09c4b54

Browse files
committed
tighten up the github actions pipeline: use Make for test invocation, and use "--locked" on most makefile uv invocations
1 parent 3efb2e6 commit 09c4b54

2 files changed

Lines changed: 17 additions & 13 deletions

File tree

.github/workflows/test.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,17 @@ jobs:
2323
with:
2424
enable-cache: true
2525

26-
- name: Set up Python
27-
uses: actions/setup-python@v5
28-
with:
29-
python-version: '3.10'
26+
#- name: Set up Python
27+
# uses: actions/setup-python@v5
28+
# with:
29+
# python-version: '3.10'
3030

31-
- name: Install dependencies
32-
run: uv sync --all-extras
31+
#- name: Install dependencies
32+
# run: uv sync --all-extras --locked
3333

3434
- name: Run fast tests
35-
run: uv run --all-extras pytest -v -m "not ml_models"
35+
#run: uv run --python=3.12 --all-extras --locked pytest -v -m "not ml_models"
36+
run: make test-fast
37+
- name: Run fast tests (earliest dependencies)
38+
#run: uv run --python=3.10 --all-extras --locked pytest -v -m "not ml_models"
39+
run: make test-lowest-deps

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
.PHONY: test test-fast docs docs-serve docs-clean docs-autobuild
22

33
test:
4-
@uv run --all-extras pytest -v
4+
@uv run --locked --all-extras pytest -v
55

66
test-fast:
7-
@uv run --all-extras pytest -v -m "not ml_models"
7+
@uv run --locked --all-extras pytest -v -m "not ml_models"
88

99
test-lowest-deps:
1010
# Test that using no extras works as intended:
@@ -13,16 +13,16 @@ test-lowest-deps:
1313
@uv run --isolated --exact --all-extras --python=3.10 --resolution=lowest-direct pytest -v
1414

1515
test-cov:
16-
@uv run --all-extras pytest -v \
16+
@uv run --locked --all-extras pytest -v \
1717
--cov=src/krnel \
1818
--cov-report=term \
1919
--cov-report=xml
2020

2121
docs:
22-
@uv run --extra docs sphinx-build -b html docs docs/_build/html
22+
@uv run --locked --extra docs sphinx-build -b html docs docs/_build/html
2323

2424
docs-autobuild:
25-
@uv run --extra docs sphinx-autobuild \
25+
@uv run --locked --extra docs sphinx-autobuild \
2626
docs docs/_build/html \
2727
--watch src \
2828
--host 0.0.0.0 --port 8020
@@ -31,7 +31,7 @@ docs-clean:
3131
@rm -rf docs/_build
3232

3333
docs-coverage:
34-
@uv run --extra docs sphinx-build -b coverage docs docs/_build/coverage
34+
@uv run --locked --extra docs sphinx-build -b coverage docs docs/_build/coverage
3535

3636
build:
3737
@uv build

0 commit comments

Comments
 (0)