Skip to content

Commit f8ad167

Browse files
committed
chore: separate benchmarks into a separate job
1 parent dd86ac7 commit f8ad167

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,36 @@ jobs:
155155
run: |
156156
hatch run doctest:test
157157
158+
benchmarks:
159+
name: Benchmark smoke test
160+
runs-on: ubuntu-latest
161+
steps:
162+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
163+
with:
164+
fetch-depth: 0
165+
persist-credentials: false
166+
- name: Set up Python
167+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
168+
with:
169+
python-version: '3.13'
170+
cache: 'pip'
171+
- name: Install Hatch
172+
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
173+
with:
174+
version: '1.16.5'
175+
- name: Run Benchmarks
176+
run: |
177+
hatch env run --env "test.py3.13-minimal" run-benchmark
178+
158179
test-complete:
159180
name: Test complete
160181

161182
needs:
162183
[
163184
test,
164185
test-upstream-and-min-deps,
165-
doctests
186+
doctests,
187+
benchmarks
166188
]
167189
if: always()
168190
runs-on: ubuntu-latest

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,11 @@ matrix.deps.dependency-groups = [
172172

173173
[tool.hatch.envs.test.scripts]
174174
run-coverage = [
175-
"coverage run --source=src -m pytest --junitxml=junit.xml -o junit_family=legacy {args:}",
175+
"coverage run --source=src -m pytest --ignore tests/benchmarks --junitxml=junit.xml -o junit_family=legacy {args:}",
176176
"coverage xml",
177177
]
178178
run-coverage-html = [
179-
"coverage run --source=src -m pytest {args:}",
179+
"coverage run --source=src -m pytest --ignore tests/benchmarks {args:}",
180180
"coverage html",
181181
]
182182
run = "pytest --ignore tests/benchmarks"

0 commit comments

Comments
 (0)