Skip to content

Commit ed33378

Browse files
ci: use matrix to spawn e2e tests in parallel
1 parent 71dbd9d commit ed33378

File tree

2 files changed

+36
-12
lines changed

2 files changed

+36
-12
lines changed

.github/workflows/checks.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,18 @@ jobs:
6262
- Nutanix
6363
# Uncomment below once we have the ability to run e2e tests on other providers from GHA.
6464
# - AWS
65+
cni:
66+
- Calico
67+
- Cilium
68+
addon-strategy:
69+
- ClusterResourceSet
70+
- HelmAddon
6571
fail-fast: false
6672
uses: ./.github/workflows/e2e.yml
6773
with:
6874
provider: ${{ matrix.provider }}
75+
cni: ${{ matrix.cni }}
76+
addon-strategy: ${{ matrix.addon-strategy }}
6977
focus: Quick start
7078
runs-on: ${{ matrix.provider == 'Nutanix' && 'self-hosted-ncn-dind' || 'ubuntu-22.04' }}
7179
secrets: inherit
@@ -81,10 +89,18 @@ jobs:
8189
# Uncomment below once we have the ability to run e2e tests on other providers from GHA.
8290
# - AWS
8391
# - Nutanix
92+
cni:
93+
- Calico
94+
- Cilium
95+
addon-strategy:
96+
- ClusterResourceSet
97+
- HelmAddon
8498
fail-fast: false
8599
uses: ./.github/workflows/e2e.yml
86100
with:
87101
provider: ${{ matrix.provider }}
102+
cni: ${{ matrix.cni }}
103+
addon-strategy: ${{ matrix.addon-strategy }}
88104
focus: Self-hosted
89105
runs-on: ${{ matrix.provider == 'Nutanix' && 'self-hosted-ncn-dind' || 'ubuntu-22.04' }}
90106
secrets: inherit

.github/workflows/e2e.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ on:
88
description: Infrastructure provider to run e2e tests with
99
type: string
1010
required: true
11+
cni:
12+
description: CNI to run e2e tests with
13+
type: string
14+
required: true
15+
addon-strategy:
16+
description: Addon strategy to run e2e tests with
17+
type: string
18+
required: true
1119
skip:
1220
description: e2e tests to skip
1321
type: string
@@ -42,6 +50,16 @@ jobs:
4250
enable-cache: "true"
4351
skip-nix-installation: ${{ inputs.provider == 'Nutanix' }}
4452

53+
- name: Go cache
54+
uses: actions/cache@v4
55+
with:
56+
path: |
57+
~/.cache/go-build
58+
~/go/pkg/mod
59+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
60+
restore-keys: |
61+
${{ runner.os }}-go-
62+
4563
# The default disk size of these runners is ~14GB, this is not enough to run the e2e tests.
4664
# Cleanup the disk, see upstream discussion https://github.com/actions/runner-images/issues/2840.
4765
- name: Cleanup Disk Space
@@ -56,7 +74,7 @@ jobs:
5674
echo "After removing files:"
5775
df -h
5876
59-
- name: Get Control Plane endpoint IP
77+
- name: Get Control Plane endpoint IP
6078
id: get-control-plane-endpoint-ip
6179
if: inputs.provider == 'Nutanix'
6280
run: |
@@ -73,18 +91,8 @@ jobs:
7391
exit 1
7492
fi
7593
76-
- name: Go cache
77-
uses: actions/cache@v4
78-
with:
79-
path: |
80-
~/.cache/go-build
81-
~/go/pkg/mod
82-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
83-
restore-keys: |
84-
${{ runner.os }}-go-
85-
8694
- name: Run e2e tests
87-
run: devbox run -- make e2e-test E2E_LABEL='provider:${{ inputs.provider }}' E2E_SKIP='${{ inputs.skip }}' E2E_FOCUS='${{ inputs.focus }}'
95+
run: devbox run -- make e2e-test E2E_LABEL='provider:${{ inputs.provider }} && cni:${{ inputs.cni }} && addonStrategy:${{ inputs.addon-strategy }}' E2E_SKIP='${{ inputs.skip }}' E2E_FOCUS='${{ inputs.focus }}'
8896
env:
8997
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9098
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}

0 commit comments

Comments
 (0)