2021-11-30 18:46:19 +02:00
|
|
|
pipeline:
|
2022-05-17 17:59:51 +02:00
|
|
|
lint-pipeline:
|
|
|
|
image: woodpeckerci/woodpecker-cli:next-alpine
|
|
|
|
commands:
|
|
|
|
- woodpecker-cli lint
|
|
|
|
when:
|
|
|
|
path:
|
|
|
|
- ".woodpecker/**"
|
|
|
|
|
2021-11-30 18:46:19 +02:00
|
|
|
dummy-web:
|
2022-02-25 13:08:48 +02:00
|
|
|
image: golang:1.17
|
2021-11-30 18:46:19 +02:00
|
|
|
commands:
|
|
|
|
- mkdir -p web/dist/
|
|
|
|
- echo "test" > web/dist/index.html
|
2022-01-29 14:58:55 +02:00
|
|
|
when:
|
|
|
|
path:
|
2022-01-29 15:26:00 +02:00
|
|
|
# related config files
|
|
|
|
- ".woodpecker/test.yml"
|
|
|
|
# go source code
|
|
|
|
- "**/*.go"
|
|
|
|
- "go.*"
|
|
|
|
# schema changes
|
|
|
|
- "pipeline/schema/**"
|
2021-11-30 18:46:19 +02:00
|
|
|
|
|
|
|
lint:
|
2022-02-25 13:08:48 +02:00
|
|
|
image: golang:1.17
|
2021-11-30 18:46:19 +02:00
|
|
|
group: test
|
|
|
|
commands:
|
|
|
|
- make lint
|
2021-12-07 02:13:31 +02:00
|
|
|
when:
|
|
|
|
path:
|
2022-01-29 15:26:00 +02:00
|
|
|
# related config files
|
|
|
|
- ".woodpecker/test.yml"
|
|
|
|
- ".golangci.yml"
|
|
|
|
# go source code
|
|
|
|
- "**/*.go"
|
|
|
|
- "go.*"
|
2021-11-30 18:46:19 +02:00
|
|
|
|
2021-12-07 02:13:31 +02:00
|
|
|
test:
|
2022-02-25 13:08:48 +02:00
|
|
|
image: golang:1.17
|
2021-11-30 18:46:19 +02:00
|
|
|
group: test
|
|
|
|
commands:
|
|
|
|
- make test-agent
|
|
|
|
- make test-server
|
|
|
|
- make test-cli
|
|
|
|
- make test-lib
|
2021-12-07 02:13:31 +02:00
|
|
|
when:
|
|
|
|
path:
|
2022-01-29 15:26:00 +02:00
|
|
|
# related config files
|
|
|
|
- ".woodpecker/test.yml"
|
|
|
|
# go source code
|
|
|
|
- "**/*.go"
|
|
|
|
- "go.*"
|
|
|
|
# schema changes
|
|
|
|
- "pipeline/schema/**"
|
2021-11-30 18:46:19 +02:00
|
|
|
|
|
|
|
sqlite:
|
2022-02-25 13:08:48 +02:00
|
|
|
image: golang:1.17
|
2021-11-30 18:46:19 +02:00
|
|
|
group: test
|
|
|
|
environment:
|
2021-12-20 17:15:21 +02:00
|
|
|
- WOODPECKER_DATABASE_DRIVER=sqlite3
|
2021-11-30 18:46:19 +02:00
|
|
|
commands:
|
2022-02-01 20:34:56 +02:00
|
|
|
- make test-server-datastore-coverage
|
2022-01-29 14:58:55 +02:00
|
|
|
when:
|
|
|
|
path:
|
2022-01-29 15:26:00 +02:00
|
|
|
# related config files
|
|
|
|
- ".woodpecker/test.yml"
|
|
|
|
# go source code
|
|
|
|
- "**/*.go"
|
|
|
|
- "go.*"
|
2021-11-30 18:46:19 +02:00
|
|
|
|
|
|
|
postgres:
|
2022-02-25 13:08:48 +02:00
|
|
|
image: golang:1.17
|
2021-11-30 18:46:19 +02:00
|
|
|
group: test
|
|
|
|
environment:
|
2021-12-20 17:15:21 +02:00
|
|
|
- WOODPECKER_DATABASE_DRIVER=postgres
|
|
|
|
- WOODPECKER_DATABASE_DATASOURCE=host=service-postgres user=postgres dbname=postgres sslmode=disable
|
2021-11-30 18:46:19 +02:00
|
|
|
commands:
|
|
|
|
- make test-server-datastore
|
2022-01-29 14:58:55 +02:00
|
|
|
when:
|
|
|
|
path:
|
2022-01-29 15:26:00 +02:00
|
|
|
# related config files
|
|
|
|
- ".woodpecker/test.yml"
|
|
|
|
# go source code
|
|
|
|
- "**/*.go"
|
|
|
|
- "go.*"
|
2021-11-30 18:46:19 +02:00
|
|
|
|
|
|
|
mysql:
|
2022-02-25 13:08:48 +02:00
|
|
|
image: golang:1.17
|
2021-11-30 18:46:19 +02:00
|
|
|
group: test
|
|
|
|
environment:
|
2021-12-20 17:15:21 +02:00
|
|
|
- WOODPECKER_DATABASE_DRIVER=mysql
|
|
|
|
- WOODPECKER_DATABASE_DATASOURCE=root@tcp(service-mysql:3306)/test?parseTime=true
|
2021-11-30 18:46:19 +02:00
|
|
|
commands:
|
|
|
|
- make test-server-datastore
|
2022-01-29 14:58:55 +02:00
|
|
|
when:
|
|
|
|
path:
|
2022-01-29 15:26:00 +02:00
|
|
|
# related config files
|
|
|
|
- ".woodpecker/test.yml"
|
|
|
|
# go source code
|
|
|
|
- "**/*.go"
|
|
|
|
- "go.*"
|
2021-11-30 18:46:19 +02:00
|
|
|
|
2022-02-01 20:34:56 +02:00
|
|
|
codecov:
|
|
|
|
pull: true
|
|
|
|
image: woodpeckerci/plugin-codecov:next-alpine
|
|
|
|
settings:
|
|
|
|
files:
|
|
|
|
- agent-coverage.out
|
|
|
|
- cli-coverage.out
|
|
|
|
- server-coverage.out
|
|
|
|
- datastore-coverage.out
|
|
|
|
token:
|
|
|
|
from_secret: codecov_token
|
2022-02-04 11:45:04 +02:00
|
|
|
when:
|
|
|
|
path:
|
|
|
|
# related config files
|
|
|
|
- ".woodpecker/test.yml"
|
|
|
|
# go source code
|
|
|
|
- "**/*.go"
|
|
|
|
- "go.*"
|
|
|
|
# schema changes
|
|
|
|
- "pipeline/schema/**"
|
2022-02-01 20:34:56 +02:00
|
|
|
|
2021-11-30 18:46:19 +02:00
|
|
|
services:
|
2021-12-07 02:13:31 +02:00
|
|
|
service-postgres:
|
2022-01-08 21:21:22 +02:00
|
|
|
image: postgres:11
|
2021-11-30 18:46:19 +02:00
|
|
|
ports: ["5432"]
|
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=postgres
|
|
|
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
2022-01-29 14:58:55 +02:00
|
|
|
when:
|
|
|
|
path:
|
2022-01-29 15:26:00 +02:00
|
|
|
# related config files
|
|
|
|
- ".woodpecker/test.yml"
|
|
|
|
# go source code
|
|
|
|
- "**/*.go"
|
|
|
|
- "go.*"
|
2022-01-29 14:58:55 +02:00
|
|
|
|
2021-12-07 02:13:31 +02:00
|
|
|
service-mysql:
|
2021-11-30 18:46:19 +02:00
|
|
|
image: mysql:5.6.27
|
|
|
|
ports: ["3306"]
|
|
|
|
environment:
|
|
|
|
- MYSQL_DATABASE=test
|
|
|
|
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
|
2022-01-29 14:58:55 +02:00
|
|
|
when:
|
|
|
|
path:
|
2022-01-29 15:26:00 +02:00
|
|
|
# related config files
|
|
|
|
- ".woodpecker/test.yml"
|
|
|
|
# go source code
|
|
|
|
- "**/*.go"
|
|
|
|
- "go.*"
|