Skip to content

Commit b99945f

Browse files
authored
ci: reduce number of simtest seeds for most PRs (#3120)
1 parent 6c2f7db commit b99945f

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/code.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ jobs:
144144
env:
145145
# Turn off Sui logging since it can be very distractive in CI
146146
RUST_LOG: simtest=info,error,sui_=off,consensus_core=off
147+
# Default: 2 seeds (1 without gRPC, 1 with gRPC). Pushes to main and PRs
148+
# with the `ci:more-simtest-seeds` label run all 5 seeds.
149+
SIMTEST_FULL: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'ci:more-simtest-seeds')
150+
}}
147151
steps:
148152
- uses: taiki-e/install-action@970d55e3ce02a46d60ffae7b4fab3dedace6e769 # pin@v2.49.13
149153
with:
@@ -156,13 +160,16 @@ jobs:
156160
- run: ./scripts/simtest/install.sh
157161
- name: Run tests (seed=1)
158162
run: MSIM_TEST_SEED=1 cargo simtest simtest --profile simtest
159-
- name: Run tests (seed=2)
160-
run: MSIM_TEST_SEED=2 cargo simtest simtest --profile simtest
161-
- name: Run tests (seed=3, grpc-client-enabled)
162-
run: MSIM_TEST_SEED=3 WALRUS_GRPC_MIGRATION_LEVEL=100 cargo simtest simtest --profile simtest
163+
- name: Run tests (seed=2, grpc-client-enabled)
164+
run: MSIM_TEST_SEED=2 WALRUS_GRPC_MIGRATION_LEVEL=100 cargo simtest simtest --profile simtest
165+
- name: Run tests (seed=3)
166+
if: env.SIMTEST_FULL == 'true'
167+
run: MSIM_TEST_SEED=3 cargo simtest simtest --profile simtest
163168
- name: Run tests (seed=4, grpc-client-enabled)
169+
if: env.SIMTEST_FULL == 'true'
164170
run: MSIM_TEST_SEED=4 WALRUS_GRPC_MIGRATION_LEVEL=100 cargo simtest simtest --profile simtest
165171
- name: Run tests (seed=5, grpc-client-enabled)
172+
if: env.SIMTEST_FULL == 'true'
166173
run: MSIM_TEST_SEED=5 WALRUS_GRPC_MIGRATION_LEVEL=100 cargo simtest simtest --profile simtest
167174

168175
simtests-build:

0 commit comments

Comments
 (0)