2021-06-01 15:30:05 +02:00
|
|
|
services:
|
|
|
|
database:
|
|
|
|
image: cockroachdb/cockroach:latest
|
|
|
|
commands:
|
|
|
|
- cockroach start-single-node --insecure
|
|
|
|
|
|
|
|
pipeline:
|
|
|
|
lint:
|
|
|
|
image: golang:latest
|
2021-06-23 13:32:27 +02:00
|
|
|
group: test
|
2021-06-01 15:30:05 +02:00
|
|
|
commands:
|
|
|
|
- apt update
|
|
|
|
- apt install python3 --yes
|
|
|
|
- ./.ci/check-testfiles
|
|
|
|
- ./.ci/check-gofmt
|
2021-09-10 23:52:56 +02:00
|
|
|
- go install github.com/client9/misspell/cmd/misspell@latest
|
2021-06-01 15:30:05 +02:00
|
|
|
- misspell -error .
|
|
|
|
|
|
|
|
test-coverage:
|
|
|
|
image: golang:latest
|
2021-06-23 13:32:27 +02:00
|
|
|
group: test
|
2021-06-01 15:30:05 +02:00
|
|
|
commands:
|
|
|
|
- go get -d -t ./...
|
2021-06-23 21:23:46 +02:00
|
|
|
- go test -ldflags "-X dev.sum7.eu/genofire/golang-lib/web.TestRunTLS=false -X dev.sum7.eu/genofire/golang-lib/web/webtest.DBConnection=postgres://root:root@database:26257/defaultdb?sslmode=disable -X dev.sum7.eu/genofire/golang-lib/database.DBConnection=postgres://root:root@database:26257/defaultdb?sslmode=disable" $(go list ./... | grep -v /vendor/) -v -failfast -p 1 -coverprofile .testCoverage.txt
|
2021-06-01 15:30:05 +02:00
|
|
|
- go tool cover -func=".testCoverage.txt"
|
|
|
|
|
|
|
|
test-race:
|
|
|
|
image: golang:latest
|
2021-06-23 13:32:27 +02:00
|
|
|
group: test-race
|
2021-06-01 15:30:05 +02:00
|
|
|
commands:
|
|
|
|
- go get -d -t ./...
|
2021-06-23 21:23:46 +02:00
|
|
|
- go test -ldflags "-X dev.sum7.eu/genofire/golang-lib/web.TestRunTLS=false -X dev.sum7.eu/genofire/golang-lib/web/webtest.DBConnection=postgres://root:root@database:26257/defaultdb?sslmode=disable -X dev.sum7.eu/genofire/golang-lib/database.DBConnection=postgres://root:root@database:26257/defaultdb?sslmode=disable" $(go list ./... | grep -v /vendor/) -race
|