golang-lib/.woodpecker.yml

31 lines
1.3 KiB
YAML
Raw Normal View History

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
commands:
- ./.ci/check-testfiles
- ./.ci/check-gofmt
2021-09-10 23:52:56 +02:00
- go install github.com/client9/misspell/cmd/misspell@latest
- misspell -error .
test-coverage:
image: golang:latest
2021-06-23 13:32:27 +02:00
group: test
commands:
- go get -d -t ./...
2023-10-23 21:40:10 +02:00
- go test -ldflags "-X codeberg.org/genofire/golang-lib/web.TestRunTLS=false -X codeberg.org/genofire/golang-lib/web/webtest.DBConnection=postgres://root:root@database:26257/defaultdb?sslmode=disable -X codeberg.org/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
2021-06-23 13:32:27 +02:00
group: test-race
commands:
- go get -d -t ./...
2023-10-23 21:40:10 +02:00
- go test -ldflags "-X codeberg.org/genofire/golang-lib/web.TestRunTLS=false -X codeberg.org/genofire/golang-lib/web/webtest.DBConnection=postgres://root:root@database:26257/defaultdb?sslmode=disable -X codeberg.org/genofire/golang-lib/database.DBConnection=postgres://root:root@database:26257/defaultdb?sslmode=disable" $(go list ./... | grep -v /vendor/) -race