mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-24 22:06:57 +00:00
Add integration tests (#86)
close #82 close #32 make sure we dont get regressions again ... as we currently have in **main** followups: - create a DNS subdomayn specific to redirect to mock url ... Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/86 Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
This commit is contained in:
parent
02bd942b04
commit
35b35c5d67
7 changed files with 150 additions and 4 deletions
|
@ -8,19 +8,30 @@ pipeline:
|
|||
- go mod vendor
|
||||
|
||||
lint:
|
||||
image: golangci/golangci-lint:v1.45.2
|
||||
image: golangci/golangci-lint:latest
|
||||
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
|
||||
- golangci-lint run --timeout 5m --build-tags integration
|
||||
|
||||
test:
|
||||
image: golang:1.18
|
||||
commands:
|
||||
- go test ./...
|
||||
- go test -race codeberg.org/codeberg/pages/server/...
|
||||
|
||||
build:
|
||||
image: golang:1.18
|
||||
commands:
|
||||
- go build
|
||||
|
||||
integration-tests:
|
||||
image: golang:1.18
|
||||
commands:
|
||||
- go test -race -tags integration codeberg.org/codeberg/pages/integration/...
|
||||
environment:
|
||||
- ACME_API=https://acme.mock.directory
|
||||
- PAGES_DOMAIN=localhost.mock.directory
|
||||
- RAW_DOMAIN=raw.localhost.mock.directory
|
||||
- PORT=4430
|
Loading…
Add table
Add a link
Reference in a new issue