pages-server/.woodpecker.yml

43 lines
993 B
YAML
Raw Normal View History

branches: main
pipeline:
# use vendor to cache dependencies
vendor:
image: golang:1.18
commands:
- go mod vendor
lint:
image: golangci/golangci-lint:v1.45.2
commands:
- go version
- go install mvdan.cc/gofumpt@latest
- "[ $(gofumpt -extra -l . | wc -l) != 0 ] && { echo 'code not formated'; exit 1; }"
2022-05-10 18:14:28 +02:00
- golangci-lint run --timeout 5m
test:
image: golang:1.18
commands:
2022-06-10 18:28:12 +02:00
- go test codeberg.org/codeberg/pages/server/...
build:
image: golang:1.18
commands:
- go build
2022-06-10 17:39:12 +02:00
integration-tests:
image: golang:1.18
detach: true
commands:
- go run . --verbose &
- pid=$!
- sleep 10s
2022-06-10 18:28:12 +02:00
- go test -tags integration codeberg.org/codeberg/pages/integration/...
2022-06-10 17:39:12 +02:00
- kill $pid
environment:
- ACME_API=https://acme.mock.directory
- ACME_ACCEPT_TERMS=true
- PAGES_DOMAIN=localhost.mock.directory
- RAW_DOMAIN=raw.localhost.mock.directory
- PORT=4430