Skip to content

Commit a396040

Browse files
authored
chore: pytest split for ci workflow (#1465)
- add pytest-split plugin to dev dependencies - use split in ci workflow based on test durations in .test_durations
1 parent cb0b327 commit a396040

File tree

3 files changed

+3103
-1
lines changed

3 files changed

+3103
-1
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
python-version: ['3.10']
24+
split_size: [4]
25+
group_number: [1, 2, 3, 4]
2426

2527
steps:
2628
- name: Checkout
@@ -62,7 +64,7 @@ jobs:
6264
# [ -f .testmondata ] && chmod u+w .testmondata || true
6365

6466
- name: Run fast CPU tests with coverage
65-
run: uv run pytest -v -n auto -m "not slow and not gpu" --cov=sbi --cov-report=xml tests/ #--testmon-forceselect
67+
run: uv run pytest -v -n auto -m "not slow and not gpu" --cov=sbi --cov-report=xml --splitting-algorithm least_duration --splits ${{ matrix.split_size }} --group ${{ matrix.group_number }} tests/ #--testmon-forceselect
6668

6769
- name: Upload coverage to Codecov
6870
uses: codecov/codecov-action@v4

0 commit comments

Comments
 (0)