Skip to content

Commit 81c3439

Browse files
committed
TEST/MINOR: ci: run only tests with tags
previously tests with tags plus all tests without tag were run
1 parent b0d74a6 commit 81c3439

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,11 @@ docker-build-sch:
204204
- kind delete cluster --name=dev
205205
parallel:
206206
matrix:
207-
- TEST_PART: [ "18#e2e_parallel", "18#e2e_https", "1#e2e_sequential" ]
207+
- TEST_PART: ["parallel", "https", "sequential-1", "sequential-2"]
208208
script:
209209
- CI_ENV=gitlab deploy/tests/create.sh
210210
- kubectl get pods -A
211-
- IFS='#' read -r -a array <<< $TEST_PART; echo "running tests with -p ${array[0]} --tags=${array[1]}"
212-
- IFS='#' read -r -a array <<< $TEST_PART; KIND_URL=docker CGO_ENABLED=0 go test -v -p ${array[0]} ./deploy/tests/e2e/... --tags=${array[1]}
211+
- echo "running make -f Makefile.ci ci-e2e-$TEST_PART tests" && make -f Makefile.ci ci-e2e-$TEST_PART
213212
.kind_deployment_schedules:
214213
needs: ["docker-build-sch"]
215214
rules:

Makefile.ci

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.PHONY: ci-e2e-parallel
2+
ci-e2e-parallel:
3+
go clean -testcache
4+
KIND_URL=docker CGO_ENABLED=0 gotest -t e2e_parallel
5+
6+
.PHONY: ci-e2e-https
7+
ci-e2e-https:
8+
go clean -testcache
9+
KIND_URL=docker CGO_ENABLED=0 gotest -t e2e_https
10+
11+
.PHONY: ci-e2e-sequential-1
12+
ci-e2e-sequential-1:
13+
go clean -testcache
14+
KIND_URL=docker CGO_ENABLED=0 gotest -t e2e_sequential -n 2 -s 0 -p 1
15+
16+
.PHONY: ci-e2e-sequential-2
17+
ci-e2e-sequential-2:
18+
go clean -testcache
19+
KIND_URL=docker CGO_ENABLED=0 gotest -t e2e_sequential -n 2 -s 1 -p 1

0 commit comments

Comments
 (0)