mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-24 22:06:57 +00:00
53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
branches: main
|
|
|
|
pipeline:
|
|
# use vendor to cache dependencies
|
|
vendor:
|
|
image: golang:1.18
|
|
commands:
|
|
- go mod vendor
|
|
|
|
lint:
|
|
image: golangci/golangci-lint:latest
|
|
group: compliant
|
|
pull: true
|
|
commands:
|
|
- go version
|
|
- go install mvdan.cc/gofumpt@latest
|
|
- "[ $(gofumpt -extra -l . | wc -l) != 0 ] && { echo 'code not formated'; exit 1; }"
|
|
- golangci-lint run --timeout 5m --build-tags integration
|
|
|
|
build:
|
|
group: compliant
|
|
image: a6543/golang_just
|
|
commands:
|
|
- go version
|
|
- just build
|
|
when:
|
|
event: [ "pull_request", "push" ]
|
|
|
|
build-tag:
|
|
group: compliant
|
|
image: a6543/golang_just
|
|
commands:
|
|
- go version
|
|
- just build-tag ${CI_COMMIT_TAG##v}
|
|
when:
|
|
event: [ "tag" ]
|
|
|
|
test:
|
|
image: a6543/golang_just
|
|
group: test
|
|
commands:
|
|
- just test
|
|
|
|
integration-tests:
|
|
image: a6543/golang_just
|
|
group: test
|
|
commands:
|
|
- just integration
|
|
environment:
|
|
- ACME_API=https://acme.mock.directory
|
|
- PAGES_DOMAIN=localhost.mock.directory
|
|
- RAW_DOMAIN=raw.localhost.mock.directory
|
|
- PORT=4430
|