-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
59 lines (52 loc) · 1.39 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
image: golang:1.22
stages:
- build
- test
- integration
# go-build builds all packages.
go-build:
stage: build
script: go build ./...
# Succeeds if no changes are suggested by gofmt -d .
gofmt:
stage: test
script: if gofmt -d . | grep . ; then false ; else true ; fi
# go-test runs tests with the data-race detector enabled.
go-test:
stage: test
script: go test -v -race ./...
# There are three flavors of the integration tests, "default" with
# primary and secondary, "extended" where secondary is promoted to new
# primary, and "ephemeral" which runs a simpler backend without mysql
# and trillian.
integration-ephemeral:
stage: integration
needs: ["go-test"]
script: ./integration/test.sh --ephemeral
artifacts:
paths:
- ./integration/tmp/
integration-default:
stage: integration
needs: ["go-test"]
services:
- alias: mysql
name: git.glasklar.is:5050/sigsum/admin/ci-container-images/trilliandb:latest
variables:
MYSQL_URI: test:test@tcp(mysql:3306)/test
script: ./integration/test.sh
artifacts:
paths:
- ./integration/tmp/
integration-extended:
stage: integration
needs: ["go-test"]
services:
- alias: mysql
name: git.glasklar.is:5050/sigsum/admin/ci-container-images/trilliandb:latest
variables:
MYSQL_URI: test:test@tcp(mysql:3306)/test
script: ./integration/test.sh --extended
artifacts:
paths:
- ./integration/tmp/