improve tests (#562)

This commit is contained in:
Anbraten 2021-12-07 01:13:31 +01:00 committed by GitHub
parent 1172dc3311
commit 4642d98f2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 21 deletions

View file

@ -10,30 +10,30 @@ pipeline:
group: test
commands:
- make lint
when:
path:
include:
- "vendor/**"
- "go.mod"
- "go.sum"
- "**/*.go"
- ".golangci.yml"
agent:
test:
image: golang:1.16
group: test
commands:
- make test-agent
server:
image: golang:1.16
group: test
commands:
- make test-server
cli:
image: golang:1.16
group: test
commands:
- make test-cli
lib:
image: golang:1.16
group: test
commands:
- make test-lib
when:
path:
include:
- "vendor/**"
- "go.mod"
- "go.sum"
- "**/*.go"
sqlite:
image: golang:1.16
@ -62,13 +62,13 @@ pipeline:
- make test-server-datastore
services:
postgres:
service-postgres:
image: postgres:9.6
ports: ["5432"]
environment:
- POSTGRES_USER=postgres
- POSTGRES_HOST_AUTH_METHOD=trust
mysql:
service-mysql:
image: mysql:5.6.27
ports: ["3306"]
environment:

View file

@ -56,12 +56,12 @@ test-agent:
test-server:
$(DOCKER_RUN) go test -race -timeout 30s github.com/woodpecker-ci/woodpecker/cmd/server $(shell go list github.com/woodpecker-ci/woodpecker/server/... | grep -v '/store')
test-server-datastore:
$(DOCKER_RUN) go test -timeout 30s github.com/woodpecker-ci/woodpecker/server/store/...
test-cli:
$(DOCKER_RUN) go test -race -timeout 30s github.com/woodpecker-ci/woodpecker/cmd/cli github.com/woodpecker-ci/woodpecker/cli/...
test-server-datastore:
$(DOCKER_RUN) go test -timeout 30s github.com/woodpecker-ci/woodpecker/server/store/...
test-frontend: frontend-dependencies
(cd web/; yarn run lint)
(cd web/; yarn run formatcheck)