Skip to content

Commit 218632c

Browse files
committed
ci: fix #3 test matrix setting
1 parent a07bd16 commit 218632c

File tree

4 files changed

+40
-39
lines changed

4 files changed

+40
-39
lines changed

.github/workflows/zombienet_cumulus.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ jobs:
4242

4343

4444
zombienet-cumulus-tests:
45-
name: ${{ matrix.job-name }}
46-
runs-on: ${{ matrix.runner-type == 'large' && needs.preflight.outputs.ZOMBIENET_SDK_LARGE_RUNNER || needs.preflight.outputs.ZOMBIENET_SDK_DEFAULT_RUNNER }}
45+
name: ${{ matrix.test.job-name }}
46+
runs-on: ${{ matrix.test.runner-type == 'large' && needs.preflight.outputs.ZOMBIENET_SDK_LARGE_RUNNER || needs.preflight.outputs.ZOMBIENET_SDK_DEFAULT_RUNNER }}
4747
timeout-minutes: 60
4848
needs: [preflight]
4949
if: ${{ (needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot) }}
@@ -52,28 +52,28 @@ jobs:
5252
options: -v /tmp/zombienet:/tmp/zombienet
5353
env:
5454
POLKADOT_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
55-
CUMULUS_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/${{ matrix.cumulus-image }}:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
55+
CUMULUS_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/${{ matrix.test.cumulus-image }}:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
5656
RUST_LOG: ${{ needs.preflight.outputs.RUST_LOG }}
5757
ZOMBIE_PROVIDER: ${{ needs.preflight.outputs.ZOMBIE_PROVIDER }}
5858

5959
strategy:
6060
fail-fast: false
6161
matrix:
62-
tests: ${{ fromJson(needs.preflight.outputs.TEST_MATRIX) }}
62+
test: ${{ fromJson(needs.preflight.outputs.TEST_MATRIX) }}
6363

6464
steps:
6565
- name: Checkout
6666
uses: actions/checkout@v4
6767

6868
- uses: actions/[email protected]
69-
if: ${{ matrix.needs-wasm-binary }}
69+
if: ${{ matrix.test.needs-wasm-binary }}
7070
with:
7171
name: build-test-parachain-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
7272
github-token: ${{ secrets.GITHUB_TOKEN }}
7373
run-id: ${{ needs.preflight.outputs.BUILD_RUN_ID }}
7474

7575
- name: provide_wasm_binary
76-
if: ${{ matrix.needs-wasm-binary }}
76+
if: ${{ matrix.test.needs-wasm-binary }}
7777
run: |
7878
tar -xvf artifacts.tar
7979
ls -ltr artifacts/*

.github/workflows/zombienet_parachain-template.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ jobs:
3737

3838

3939
zombienet-cumulus-tests:
40-
name: ${{ matrix.job-name }}
41-
runs-on: ${{ matrix.runner-type == 'large' && needs.preflight.outputs.ZOMBIENET_SDK_LARGE_RUNNER || needs.preflight.outputs.ZOMBIENET_SDK_DEFAULT_RUNNER }}
40+
name: ${{ matrix.test.job-name }}
41+
runs-on: ${{ matrix.test.runner-type == 'large' && needs.preflight.outputs.ZOMBIENET_SDK_LARGE_RUNNER || needs.preflight.outputs.ZOMBIENET_SDK_DEFAULT_RUNNER }}
4242
timeout-minutes: 30
4343
needs: [preflight]
4444
if: ${{ (needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot) }}
@@ -47,13 +47,14 @@ jobs:
4747
options: -v /tmp/zombienet:/tmp/zombienet
4848
env:
4949
POLKADOT_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
50-
CUMULUS_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/${{ matrix.cumulus-image }}:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
50+
CUMULUS_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/${{ matrix.test.cumulus-image }}:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
5151
RUST_LOG: ${{ needs.preflight.outputs.RUST_LOG }}
5252
ZOMBIE_PROVIDER: ${{ needs.preflight.outputs.ZOMBIE_PROVIDER }}
5353

5454
strategy:
5555
fail-fast: false
56-
matrix: ${{ fromJson(needs.preflight.outputs.TEST_MATRIX) }}
56+
matrix:
57+
test: ${{ fromJson(needs.preflight.outputs.TEST_MATRIX) }}
5758

5859
steps:
5960
- name: Checkout
@@ -62,8 +63,8 @@ jobs:
6263
- name: zombienet_test
6364
uses: ./.github/actions/zombienet-sdk
6465
with:
65-
test-filter: ${{ matrix.test-filter }}
66-
job-name: ${{ matrix.job-name }}
66+
test-filter: ${{ matrix.test.test-filter }}
67+
job-name: ${{ matrix.test.job-name }}
6768
prefix: "parachain-templates"
6869
gh-token: ${{ secrets.GITHUB_TOKEN }}
6970
build-id: ${{ needs.preflight.outputs.BUILD_RUN_ID }}

.github/workflows/zombienet_polkadot.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ jobs:
4141
test_pattern: ${{ inputs.test_pattern }}
4242

4343
zombienet-polkadot-tests:
44-
name: ${{ matrix.job-name }}
45-
runs-on: ${{ matrix.runner-type == 'large' && (matrix.use-zombienet-sdk && needs.preflight.outputs.ZOMBIENET_SDK_LARGE_RUNNER || needs.preflight.outputs.ZOMBIENET_LARGE_RUNNER) || (matrix.use-zombienet-sdk && needs.preflight.outputs.ZOMBIENET_SDK_DEFAULT_RUNNER || needs.preflight.outputs.ZOMBIENET_DEFAULT_RUNNER) }}
44+
name: ${{ matrix.test.job-name }}
45+
runs-on: ${{ matrix.test.runner-type == 'large' && (matrix.test.use-zombienet-sdk && needs.preflight.outputs.ZOMBIENET_SDK_LARGE_RUNNER || needs.preflight.outputs.ZOMBIENET_LARGE_RUNNER) || (matrix.test.use-zombienet-sdk && needs.preflight.outputs.ZOMBIENET_SDK_DEFAULT_RUNNER || needs.preflight.outputs.ZOMBIENET_DEFAULT_RUNNER) }}
4646
timeout-minutes: 60
4747
needs: [preflight]
4848
if: ${{ (needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_polkadot) }}
4949
container:
50-
image: ${{ matrix.use-zombienet-sdk && needs.preflight.outputs.ZOMBIENET_SDK_IMAGE || needs.preflight.outputs.ZOMBIENET_IMAGE }}
50+
image: ${{ matrix.test.use-zombienet-sdk && needs.preflight.outputs.ZOMBIENET_SDK_IMAGE || needs.preflight.outputs.ZOMBIENET_IMAGE }}
5151
options: -v /tmp/zombienet:/tmp/zombienet
5252
env:
5353
ZOMBIENET_INTEGRATION_TEST_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
5454
POLKADOT_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
5555
COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/colander:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
56-
CUMULUS_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/${{ matrix.cumulus-image || 'polkadot-parachain-debug' }}:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
56+
CUMULUS_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/${{ matrix.test.cumulus-image || 'polkadot-parachain-debug' }}:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
5757
MALUS_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/malus:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
5858
DEBUG: ${{ needs.preflight.outputs.DEBUG }}
5959
ZOMBIENET_PROVIDER: ${{ needs.preflight.outputs.ZOMBIENET_PROVIDER }}
@@ -62,41 +62,41 @@ jobs:
6262
strategy:
6363
fail-fast: false
6464
matrix:
65-
tests: ${{ fromJson(needs.preflight.outputs.TEST_MATRIX) }}
65+
test: ${{ fromJson(needs.preflight.outputs.TEST_MATRIX) }}
6666

6767
steps:
6868
- name: Checkout
6969
uses: actions/checkout@v4
7070

7171
- name: Set additional environment variables
72-
if: ${{ matrix.additional-env }}
72+
if: ${{ matrix.test.additional-env }}
7373
shell: bash
7474
run: |
75-
echo '${{ toJson(matrix.additional-env) }}' | jq -r 'to_entries[] | "\(.key)=\(.value)"' >> $GITHUB_ENV
75+
echo '${{ toJson(matrix.test.additional-env) }}' | jq -r 'to_entries[] | "\(.key)=\(.value)"' >> $GITHUB_ENV
7676
7777
- name: Additional setup
78-
if: ${{ matrix.additional-setup }}
78+
if: ${{ matrix.test.additional-setup }}
7979
shell: bash
80-
run: ${{ matrix.additional-setup }}
80+
run: ${{ matrix.test.additional-setup }}
8181

8282
- name: zombienet_test (traditional)
83-
if: ${{ !matrix.use-zombienet-sdk }}
83+
if: ${{ !matrix.test.use-zombienet-sdk }}
8484
uses: ./.github/actions/zombienet
8585
with:
86-
test-definition: ${{ matrix.test-definition }}
87-
job-name: ${{ matrix.job-name }}
88-
local-dir: ${{ matrix.local-dir }}
89-
concurrency: ${{ matrix.concurrency || 1 }}
86+
test-definition: ${{ matrix.test.test-definition }}
87+
job-name: ${{ matrix.test.job-name }}
88+
local-dir: ${{ matrix.test.local-dir }}
89+
concurrency: ${{ matrix.test.concurrency || 1 }}
9090
gh-token: ${{ secrets.GITHUB_TOKEN }}
9191
build-id: ${{ needs.preflight.outputs.BUILD_RUN_ID }}
9292
ref-slug: ${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
9393

9494
- name: zombienet_test (sdk)
95-
if: ${{ matrix.use-zombienet-sdk }}
95+
if: ${{ matrix.test.use-zombienet-sdk }}
9696
uses: ./.github/actions/zombienet-sdk
9797
with:
98-
test-filter: ${{ matrix.test-filter }}
99-
job-name: ${{ matrix.job-name }}
98+
test-filter: ${{ matrix.test.test-filter }}
99+
job-name: ${{ matrix.test.job-name }}
100100
prefix: "polkadot"
101101
gh-token: ${{ secrets.GITHUB_TOKEN }}
102102
build-id: ${{ needs.preflight.outputs.BUILD_RUN_ID }}

.github/workflows/zombienet_substrate.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ jobs:
4545
test_pattern: ${{ inputs.test_pattern }}
4646

4747
zombienet-substrate-tests:
48-
name: ${{ matrix.job-name }}
49-
runs-on: ${{ matrix.runner-type == 'large' && (matrix.use-zombienet-sdk && needs.preflight.outputs.ZOMBIENET_SDK_LARGE_RUNNER || needs.preflight.outputs.ZOMBIENET_LARGE_RUNNER) || (matrix.use-zombienet-sdk && needs.preflight.outputs.ZOMBIENET_SDK_DEFAULT_RUNNER || needs.preflight.outputs.ZOMBIENET_DEFAULT_RUNNER) }}
48+
name: ${{ matrix.test.job-name }}
49+
runs-on: ${{ matrix.test.runner-type == 'large' && (matrix.test.use-zombienet-sdk && needs.preflight.outputs.ZOMBIENET_SDK_LARGE_RUNNER || needs.preflight.outputs.ZOMBIENET_LARGE_RUNNER) || (matrix.test.use-zombienet-sdk && needs.preflight.outputs.ZOMBIENET_SDK_DEFAULT_RUNNER || needs.preflight.outputs.ZOMBIENET_DEFAULT_RUNNER) }}
5050
timeout-minutes: 60
5151
needs: [preflight]
5252
if: ${{ (needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_polkadot) }}
5353
container:
54-
image: ${{ matrix.use-zombienet-sdk && needs.preflight.outputs.ZOMBIENET_SDK_IMAGE || needs.preflight.outputs.ZOMBIENET_IMAGE }}
54+
image: ${{ matrix.test.use-zombienet-sdk && needs.preflight.outputs.ZOMBIENET_SDK_IMAGE || needs.preflight.outputs.ZOMBIENET_IMAGE }}
5555
options: -v /tmp/zombienet:/tmp/zombienet
5656
env:
5757
ZOMBIENET_INTEGRATION_TEST_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
@@ -63,24 +63,24 @@ jobs:
6363
strategy:
6464
fail-fast: false
6565
matrix:
66-
tests: ${{ fromJson(needs.preflight.outputs.TEST_MATRIX) }}
66+
test: ${{ fromJson(needs.preflight.outputs.TEST_MATRIX) }}
6767

6868
steps:
6969
- name: Checkout
7070
uses: actions/checkout@v4
7171

7272
- name: Additional setup
73-
if: ${{ matrix.additional-setup }}
73+
if: ${{ matrix.test.additional-setup }}
7474
shell: bash
75-
run: ${{ matrix.additional-setup }}
75+
run: ${{ matrix.test.additional-setup }}
7676

7777
- name: zombienet_test (traditional)
7878
uses: ./.github/actions/zombienet
7979
with:
80-
test-definition: ${{ matrix.test-definition }}
81-
job-name: ${{ matrix.job-name }}
82-
local-dir: ${{ matrix.local-dir }}
83-
concurrency: ${{ matrix.concurrency || 1 }}
80+
test-definition: ${{ matrix.test.test-definition }}
81+
job-name: ${{ matrix.test.job-name }}
82+
local-dir: ${{ matrix.test.local-dir }}
83+
concurrency: ${{ matrix.test.concurrency || 1 }}
8484
gh-token: ${{ secrets.GITHUB_TOKEN }}
8585
build-id: ${{ needs.preflight.outputs.BUILD_RUN_ID }}
8686
ref-slug: ${{ needs.preflight.outputs.SOURCE_REF_SLUG }}

0 commit comments

Comments
 (0)