golang-lib/.woodpecker.yml

30 lines
1.2 KiB
YAML
Raw Normal View History

services:
database:
image: cockroachdb/cockroach:latest
commands:
- cockroach start-single-node --insecure
pipeline:
lint:
image: golang:latest
commands:
- apt update
- apt install python3 --yes
- ./.ci/check-testfiles
- ./.ci/check-gofmt
- go get github.com/client9/misspell/cmd/misspell
- misspell -error .
test-coverage:
image: golang:latest
commands:
- go get -d -t ./...
2021-06-02 18:20:42 +02:00
- go test -ldflags "-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
- go tool cover -func=".testCoverage.txt"
test-race:
image: golang:latest
commands:
- go get -d -t ./...
2021-06-02 18:20:42 +02:00
- go test -ldflags "-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