File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed
Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,10 @@ jobs:
125125 # Runs two test sets in parallel.
126126 ci-network-scenario :
127127 runs-on : ubuntu-latest
128+ strategy :
129+ fail-fast : false
130+ matrix :
131+ test_set : ["1", "2"]
128132 # We either run after a release (tag starting with v), or when the ci-network-scenario label is present in a PR.
129133 # We exclude ci-release-pr test tags (v0.0.1-commit.*) which are only for testing the release process.
130134 needs : ci
@@ -166,7 +170,7 @@ jobs:
166170 docker_image=""
167171 fi
168172 set -x # print next line
169- ./.github/ci3.sh network-scenarios next-scenario "$namespace" "$docker_image"
173+ ./.github/ci3.sh network-scenarios next-scenario "$namespace" "$docker_image" "${{ matrix.test_set }}"
170174
171175 - name : Cleanup network resources
172176 # Clean up if this is a CI label or nightly.
@@ -180,8 +184,7 @@ jobs:
180184 GCP_PROJECT_ID : ${{ secrets.GCP_PROJECT_ID }}
181185 NO_SPOT : 1
182186 run : |
183- ./.github/ci3.sh network-teardown next-scenario "${NAMESPACE}-1" || true
184- ./.github/ci3.sh network-teardown next-scenario "${NAMESPACE}-2" || true
187+ ./.github/ci3.sh network-teardown next-scenario "${NAMESPACE}-${{ matrix.test_set }}" || true
185188
186189 # ############
187190 # Benchmarks
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ concurrency:
3232jobs :
3333 deploy-and-test :
3434 runs-on : ubuntu-latest
35+ strategy :
36+ fail-fast : false
37+ matrix :
38+ test_set : ${{ fromJSON(inputs.test_set == '' && '["1","2"]' || format('["{0}"]', inputs.test_set)) }}
3539 steps :
3640 - name : Checkout
3741 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
5155 run : |
5256 namespace=$(echo "${{ inputs.namespace }}" | sed 's/[^a-z0-9-]/-/g' | cut -c1-20)
5357 echo "NAMESPACE=$namespace" >> $GITHUB_ENV
54- # Run scenario tests (both sets in parallel, or specific set if provided)
55- ./.github/ci3.sh network-scenarios "${{ inputs.env_file }}" "$namespace" "${{ inputs.docker_image }}" "${{ inputs .test_set }}"
58+ # Run scenario tests for the selected set (matrix expands to 1 or 2).
59+ ./.github/ci3.sh network-scenarios "${{ inputs.env_file }}" "$namespace" "${{ inputs.docker_image }}" "${{ matrix .test_set }}"
5660
5761 - name : Cleanup network resources
5862 if : always()
6569 GCP_PROJECT_ID : ${{ secrets.GCP_PROJECT_ID }}
6670 NO_SPOT : 1
6771 run : |
68- test_set="${{ inputs.test_set }}"
69- if [[ -z "$test_set" ]]; then
70- ./.github/ci3.sh network-teardown "${{ inputs.env_file }}" "${NAMESPACE}-1" || true
71- ./.github/ci3.sh network-teardown "${{ inputs.env_file }}" "${NAMESPACE}-2" || true
72- else
73- ./.github/ci3.sh network-teardown "${{ inputs.env_file }}" "${NAMESPACE}-${test_set}" || true
74- fi
72+ ./.github/ci3.sh network-teardown "${{ inputs.env_file }}" "${NAMESPACE}-${{ matrix.test_set }}" || true
You can’t perform that action at this time.
0 commit comments