2021-11-30 16:46:19 +00:00
|
|
|
pipeline:
|
|
|
|
dummy-web:
|
|
|
|
image: golang:1.16
|
|
|
|
commands:
|
|
|
|
- mkdir -p web/dist/
|
|
|
|
- echo "test" > web/dist/index.html
|
|
|
|
|
|
|
|
lint:
|
|
|
|
image: golang:1.16
|
|
|
|
group: test
|
|
|
|
commands:
|
|
|
|
- make lint
|
2021-12-07 00:13:31 +00:00
|
|
|
when:
|
|
|
|
path:
|
|
|
|
include:
|
|
|
|
- "vendor/**"
|
|
|
|
- "go.mod"
|
|
|
|
- "go.sum"
|
|
|
|
- "**/*.go"
|
|
|
|
- ".golangci.yml"
|
2021-11-30 16:46:19 +00:00
|
|
|
|
2021-12-07 00:13:31 +00:00
|
|
|
test:
|
2021-11-30 16:46:19 +00:00
|
|
|
image: golang:1.16
|
|
|
|
group: test
|
|
|
|
commands:
|
|
|
|
- make test-agent
|
|
|
|
- make test-server
|
|
|
|
- make test-cli
|
|
|
|
- make test-lib
|
2021-12-07 00:13:31 +00:00
|
|
|
when:
|
|
|
|
path:
|
|
|
|
include:
|
|
|
|
- "vendor/**"
|
|
|
|
- "go.mod"
|
|
|
|
- "go.sum"
|
|
|
|
- "**/*.go"
|
2021-11-30 16:46:19 +00:00
|
|
|
|
|
|
|
sqlite:
|
|
|
|
image: golang:1.16
|
|
|
|
group: test
|
|
|
|
environment:
|
2021-12-20 15:15:21 +00:00
|
|
|
- WOODPECKER_DATABASE_DRIVER=sqlite3
|
2021-11-30 16:46:19 +00:00
|
|
|
commands:
|
|
|
|
- make test-server-datastore
|
|
|
|
|
|
|
|
postgres:
|
|
|
|
image: golang:1.16
|
|
|
|
group: test
|
|
|
|
environment:
|
2021-12-20 15:15:21 +00:00
|
|
|
- WOODPECKER_DATABASE_DRIVER=postgres
|
|
|
|
- WOODPECKER_DATABASE_DATASOURCE=host=service-postgres user=postgres dbname=postgres sslmode=disable
|
2021-11-30 16:46:19 +00:00
|
|
|
commands:
|
|
|
|
- make test-server-datastore
|
|
|
|
|
|
|
|
mysql:
|
|
|
|
image: golang:1.16
|
|
|
|
group: test
|
|
|
|
environment:
|
2021-12-20 15:15:21 +00:00
|
|
|
- WOODPECKER_DATABASE_DRIVER=mysql
|
|
|
|
- WOODPECKER_DATABASE_DATASOURCE=root@tcp(service-mysql:3306)/test?parseTime=true
|
2021-11-30 16:46:19 +00:00
|
|
|
commands:
|
|
|
|
- make test-server-datastore
|
|
|
|
|
|
|
|
services:
|
2021-12-07 00:13:31 +00:00
|
|
|
service-postgres:
|
2021-11-30 16:46:19 +00:00
|
|
|
image: postgres:9.6
|
|
|
|
ports: ["5432"]
|
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=postgres
|
|
|
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
2021-12-07 00:13:31 +00:00
|
|
|
service-mysql:
|
2021-11-30 16:46:19 +00:00
|
|
|
image: mysql:5.6.27
|
|
|
|
ports: ["3306"]
|
|
|
|
environment:
|
|
|
|
- MYSQL_DATABASE=test
|
|
|
|
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
|