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

View file

@ -56,12 +56,12 @@ test-agent:
test-server: 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') $(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: test-cli:
$(DOCKER_RUN) go test -race -timeout 30s github.com/woodpecker-ci/woodpecker/cmd/cli github.com/woodpecker-ci/woodpecker/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 test-frontend: frontend-dependencies
(cd web/; yarn run lint) (cd web/; yarn run lint)
(cd web/; yarn run formatcheck) (cd web/; yarn run formatcheck)