Skip to content

Commit ba670d5

Browse files
Use uv sync to set up dependencies in ci.yaml (#874)
* Use `uv sync` to set up dependencies in `ci.yaml` Bump GitHub Action versions * Ignore .tmp dirs in Coverage reporting * Exclude the `_temp` directory when running Coverage.py
1 parent 9fab283 commit ba670d5

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ jobs:
4646
- name: Setup dependencies
4747
run: |
4848
uv python pin ${{ matrix.python-version }}
49-
uv export --no-managed-python --resolution ${{ matrix.resolution }} > ci-requirements.txt
50-
uv pip install --system -r ci-requirements.txt
49+
uv sync --resolution ${{ matrix.resolution }}
5150
5251
- name: Run pre-commit
5352
if: matrix.pre-commit
@@ -58,24 +57,25 @@ jobs:
5857
uses: pavelzw/pytest-action@510c5e90c360a185039bea56ce8b3e7e51a16507 # v2.2.0
5958
if: matrix.pytest
6059
with:
60+
custom-pytest: uv run --frozen pytest
6161
custom-arguments: --cov --junitxml=junit.xml -o junit_family=legacy
6262

6363
- name: Run benchmarks
64-
uses: CodSpeedHQ/action@513a19673a831f139e8717bf45ead67e47f00044 # v3.2.0
64+
uses: CodSpeedHQ/action@c28fe9fbe7d57a3da1b7834ae3761c1d8217612d # v3.7.0
6565
if: matrix.codspeed
6666
with:
6767
token: ${{ secrets.CODSPEED_TOKEN }}
68-
run: pytest --codspeed
68+
run: uv run --frozen pytest --codspeed
6969

7070
- name: Upload coverage reports to Codecov
71-
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
71+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
7272
if: matrix.codecov
7373
with:
7474
token: ${{ secrets.CODECOV_TOKEN }}
7575

7676
- name: Upload test results to Codecov
7777

78-
uses: codecov/test-results-action@44ecb3a270cd942bdf0fa8f2ce14cb32493e810a # v1.0.3
78+
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
7979
if: matrix.codecov && !cancelled()
8080
with:
8181
token: ${{ secrets.CODECOV_TOKEN }}

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ minversion = "7"
156156

157157
[tool.coverage.run]
158158
source = [ "src" ]
159-
omit = [ "*/pytest-of-*/*" ]
159+
omit = [ "*/pytest-of-*/*", "*/_temp/*" ]
160160

161161
[tool.coverage.report]
162162
exclude_also = [
@@ -167,7 +167,7 @@ exclude_also = [
167167
"class .*\\bProtocol\\):",
168168
"@(abc\\.)?abstractmethod",
169169
]
170-
omit = [ "*/pytest-of-*/*" ]
170+
omit = [ "*/pytest-of-*/*", "*/_temp/*" ]
171171

172172
[tool.uv]
173173
required-version = ">=0.6.8" # Sync with README

0 commit comments

Comments
 (0)