Skip to content

Commit 43d1011

Browse files
committed
Try using uv for unit test workflow
1 parent ea45598 commit 43d1011

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/unit_tests.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,29 @@ jobs:
2727

2828
steps:
2929
- uses: actions/checkout@v3
30+
31+
# use github python action instead of uv to take advantage of caching
3032
- name: Set up Python ${{ matrix.python-version }}
3133
uses: actions/setup-python@v4
3234
with:
3335
python-version: ${{ matrix.python }}
3436
cache: 'pip'
3537
cache-dependency-path: '**/pyproject.toml'
38+
39+
- name: Install uv
40+
uses: astral-sh/setup-uv@v5
41+
3642
- name: Install package with dependencies
37-
run: pip install -e ".[test]"
43+
run: uv sync --all-extras --dev
3844

3945
# for all versions but the one we use for code coverage, run normally
4046
- name: Run unit tests normally
41-
run: pytest
47+
run: uv run pytest
4248
if: ${{ matrix.python != env.COV_PYTHON_VERSION }}
4349

4450
# run code coverage in one version only
4551
- name: Run unit tests with code coverage reporting
46-
run: pytest --cov=undate
52+
run: uv run pytest --cov=undate
4753
if: ${{ matrix.python == env.COV_PYTHON_VERSION }}
4854
- name: Upload test coverage to Codecov
4955
uses: codecov/codecov-action@v3

0 commit comments

Comments
 (0)