Skip to content

Commit

Permalink
chore[ci]: use --dist worksteal from latest xdist (vyperlang#3869)
Browse files Browse the repository at this point in the history
should reduce test time, especially when there is a high degree of
parallelism

also increase the number of runners, as gh actions has increased limits
lately
  • Loading branch information
charles-cooper authored Mar 17, 2024
1 parent 8f05b4e commit 58ecff5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ jobs:
- name: Run tests
run: |
pytest \
--dist worksteal \
-m "not fuzzing" \
--optimize ${{ matrix.opt-mode }} \
--evm-version ${{ matrix.evm-version }} \
Expand Down Expand Up @@ -171,7 +172,10 @@ jobs:

strategy:
matrix:
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60]
# note that every time this is updated, `--splits` needs to be
# updated below as well.
# python -c "print(list(range(1, 121)))"
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120]

steps:
- uses: actions/checkout@v4
Expand All @@ -195,9 +199,10 @@ jobs:
run: |
pytest \
-m "fuzzing" \
--splits 60 \
--splits 120 \
--group ${{ matrix.group }} \
--splitting-algorithm least_duration \
--dist worksteal \
-r aR tests/
- name: Upload Coverage
Expand Down
2 changes: 1 addition & 1 deletion quicktest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

# run pytest but bail out on first error and suppress coverage.
# useful for dev workflow
pytest -q --no-cov -s --instafail -x --disable-warnings "$@"
pytest --dist worksteal -q --no-cov -s --instafail -x --disable-warnings "$@"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"pytest>=8.0,<9.0",
"pytest-cov>=4.1,<5.0",
"pytest-instafail>=0.4,<1.0",
"pytest-xdist>=2.5,<3.0",
"pytest-xdist>=3.5,<4.0",
"pytest-split>=0.7.0,<1.0",
"eth-tester[py-evm]>=0.9.0b1,<0.10",
"eth_abi>=4.0.0,<5.0.0",
Expand Down

0 comments on commit 58ecff5

Please sign in to comment.