Skip to content

Commit 8d23f53

Browse files
committed
chore(ci): parallelize integration tests
1 parent e7a2b91 commit 8d23f53

File tree

4 files changed

+39
-6
lines changed

4 files changed

+39
-6
lines changed

.github/workflows/ci.yaml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ jobs:
8888
needs:
8989
- int-tests-api
9090
- int-tests-kind
91+
- int-tests-kind-ha-registry
9192
steps:
9293
- name: Succeed if all tests passed
9394
run: echo "Integration tests succeeded"
@@ -124,12 +125,34 @@ jobs:
124125
cache-dependency-path: "**/*.sum"
125126
- name: Install kind
126127
run: |
127-
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.27.0/kind-linux-amd64
128+
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.29.0/kind-linux-amd64
128129
chmod +x ./kind
129130
sudo mv ./kind /usr/local/bin/kind
130131
- name: Run tests
131132
run: |
132-
make -C tests/integration test-kind
133+
make -C tests/integration test-kind SHORT=true
134+
135+
int-tests-kind-ha-registry:
136+
name: Integration tests (kind) HA registry
137+
runs-on: ubuntu-latest
138+
steps:
139+
- name: Checkout
140+
uses: actions/checkout@v4
141+
with:
142+
fetch-depth: 0
143+
- name: Setup go
144+
uses: actions/setup-go@v5
145+
with:
146+
go-version-file: go.mod
147+
cache-dependency-path: "**/*.sum"
148+
- name: Install kind
149+
run: |
150+
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.29.0/kind-linux-amd64
151+
chmod +x ./kind
152+
sudo mv ./kind /usr/local/bin/kind
153+
- name: Run tests
154+
run: |
155+
make -C tests/integration/kind test-registry RUN=TestRegistry_EnableHAAirgap
133156
134157
dryrun-tests:
135158
name: Dryrun tests

tests/integration/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ SHELL := /bin/bash
33
DEBUG ?=
44
PARALLEL ?= 2
55
RUN ?=
6+
SHORT ?= false
67

78
.PHONY: test
89
test: test-kind

tests/integration/kind/Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ SHELL := /bin/bash
22

33
DEBUG ?=
44
RUN ?=
5+
SHORT ?= false
56

67
GO_BUILD_TAGS ?= containers_image_openpgp,exclude_graphdriver_btrfs,exclude_graphdriver_devicemapper,exclude_graphdriver_overlay
78

@@ -13,7 +14,8 @@ test-openebs: openebs.test
1314
DEBUG=$(DEBUG) ./openebs.test \
1415
-test.v \
1516
-test.timeout=5m \
16-
-test.run='$(value RUN)'
17+
-test.run='$(value RUN)' \
18+
-test.short=$(SHORT)
1719

1820
.PHONY: test-registry
1921
test-registry: registry.test
@@ -22,21 +24,24 @@ test-registry: registry.test
2224
DEBUG=$(DEBUG) SKIP_OPERATOR_IMAGE_BUILD=1 ./registry.test \
2325
-test.v \
2426
-test.timeout=15m \
25-
-test.run='$(value RUN)'
27+
-test.run='$(value RUN)' \
28+
-test.short=$(SHORT)
2629

2730
.PHONY: test-velero
2831
test-velero: velero.test
2932
DEBUG=$(DEBUG) ./velero.test \
3033
-test.v \
3134
-test.timeout=5m \
32-
-test.run='$(value RUN)'
35+
-test.run='$(value RUN)' \
36+
-test.short=$(SHORT)
3337

3438
.PHONY: test-adminconsole
3539
test-adminconsole: adminconsole.test
3640
DEBUG=$(DEBUG) ./adminconsole.test \
3741
-test.v \
3842
-test.timeout=5m \
39-
-test.run='$(value RUN)'
43+
-test.run='$(value RUN)' \
44+
-test.short=$(SHORT)
4045

4146
.PHONY: clean
4247
clean:

tests/integration/kind/registry/ha_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ import (
3030
)
3131

3232
func TestRegistry_EnableHAAirgap(t *testing.T) {
33+
if testing.Short() {
34+
t.Skip("skipping test in short mode")
35+
}
36+
3337
ctx := t.Context()
3438

3539
buildOperatorImage(t)

0 commit comments

Comments
 (0)