Skip to content

Commit

Permalink
increase concurrency for base tests
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Mar 17, 2024
1 parent 16f9f88 commit 683bfc3
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
opt-mode: ["gas", "none", "codesize"]
evm-version: [shanghai]
debug: [true, false]
group: [1, 2, 3]
memorymock: [false]

# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
Expand Down Expand Up @@ -114,7 +115,7 @@ jobs:
debug: false
evm-version: shanghai

name: py${{ matrix.python-version[1] }}-opt-${{ matrix.opt-mode }}${{ matrix.debug && '-debug' || '' }}${{ matrix.memorymock && '-memorymock' || '' }}-${{ matrix.evm-version }}
name: py${{ matrix.python-version[1] }}-opt-${{ matrix.opt-mode }}${{ matrix.debug && '-debug' || '' }}${{ matrix.memorymock && '-memorymock' || '' }}-${{ matrix.evm-version }}-group${{ matrix.group }}

steps:
- uses: actions/checkout@v4
Expand All @@ -128,6 +129,11 @@ jobs:
python-version: ${{ matrix.python-version[0] }}
cache: "pip"

# fetch test durations for splitting
# NOTE: if the tests get poorly distributed, run this and commit the resulting `.test_durations` file to the `vyper-test-durations` repo.
# `pytest --store-durations -r aR tests/`
- name: Fetch test-durations
run: curl --location "https://raw.githubusercontent.com/vyperlang/vyper-test-durations/master/test_durations" -o .test_durations
- name: Install dependencies
run: pip install .[test]

Expand All @@ -137,6 +143,9 @@ jobs:
- name: Run tests
run: |
pytest \
--splits 3 \
--group ${{ matrix.group }} \
--splitting-algorithm least_duration \
--dist worksteal \
-m "not fuzzing" \
--optimize ${{ matrix.opt-mode }} \
Expand Down Expand Up @@ -172,7 +181,8 @@ 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, 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]
# python -c "print(list(range(1, 101)))"
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 @@ -186,17 +196,14 @@ jobs:
- name: Install dependencies
run: pip install .[test]

# fetch test durations
# NOTE: if the tests get poorly distributed, run this and commit the resulting `.test_durations` file to the `vyper-test-durations` repo.
# `pytest -m "fuzzing" --store-durations -r aR tests/`
- name: Fetch test-durations
run: curl --location "https://raw.githubusercontent.com/vyperlang/vyper-test-durations/master/test_durations" -o .test_durations

- name: Run tests
run: |
pytest \
-m "fuzzing" \
--splits 100 \
--splits 120 \
--group ${{ matrix.group }} \
--splitting-algorithm least_duration \
--dist worksteal \
Expand Down

0 comments on commit 683bfc3

Please sign in to comment.