woodpecker/.woodpecker/test.yml

153 lines
3.3 KiB
YAML
Raw Normal View History

pipeline:
2022-05-17 15:59:51 +00:00
lint-pipeline:
image: woodpeckerci/woodpecker-cli:next-alpine
commands:
- woodpecker-cli lint
2022-05-20 03:27:43 +00:00
# when:
# path:
# - ".woodpecker/**"
2022-05-17 15:59:51 +00:00
dummy-web:
2022-02-25 11:08:48 +00:00
image: golang:1.17
commands:
- mkdir -p web/dist/
- echo "test" > web/dist/index.html
2022-05-20 03:27:43 +00:00
# when:
# path:
# # related config files
# - ".woodpecker/test.yml"
# # go source code
# - "**/*.go"
# - "go.*"
# # schema changes
# - "pipeline/schema/**"
lint:
2022-02-25 11:08:48 +00:00
image: golang:1.17
group: test
commands:
- make lint
2022-05-20 03:27:43 +00:00
# when:
# path:
# # related config files
# - ".woodpecker/test.yml"
# - ".golangci.yml"
# # go source code
# - "**/*.go"
# - "go.*"
2021-12-07 00:13:31 +00:00
test:
2022-02-25 11:08:48 +00:00
image: golang:1.17
group: test
commands:
- make test-agent
- make test-server
- make test-cli
- make test-lib
2022-05-20 03:27:43 +00:00
# when:
# path:
# # related config files
# - ".woodpecker/test.yml"
# # go source code
# - "**/*.go"
# - "go.*"
# # schema changes
# - "pipeline/schema/**"
sqlite:
2022-02-25 11:08:48 +00:00
image: golang:1.17
group: test
environment:
- WOODPECKER_DATABASE_DRIVER=sqlite3
commands:
- make test-server-datastore-coverage
2022-05-20 03:27:43 +00:00
# when:
# path:
# # related config files
# - ".woodpecker/test.yml"
# # go source code
# - "**/*.go"
# - "go.*"
postgres:
2022-02-25 11:08:48 +00:00
image: golang:1.17
group: test
environment:
- WOODPECKER_DATABASE_DRIVER=postgres
- WOODPECKER_DATABASE_DATASOURCE=host=service-postgres user=postgres dbname=postgres sslmode=disable
commands:
- make test-server-datastore
2022-05-20 03:27:43 +00:00
# when:
# path:
# # related config files
# - ".woodpecker/test.yml"
# # go source code
# - "**/*.go"
# - "go.*"
mysql:
2022-02-25 11:08:48 +00:00
image: golang:1.17
group: test
environment:
- WOODPECKER_DATABASE_DRIVER=mysql
- WOODPECKER_DATABASE_DATASOURCE=root@tcp(service-mysql:3306)/test?parseTime=true
commands:
- make test-server-datastore
2022-05-20 03:27:43 +00:00
# when:
# path:
# # related config files
# - ".woodpecker/test.yml"
# # go source code
# - "**/*.go"
# - "go.*"
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-05-20 03:27:43 +00:00
# when:
# path:
# # related config files
# - ".woodpecker/test.yml"
# # go source code
# - "**/*.go"
# - "go.*"
# # schema changes
# - "pipeline/schema/**"
services:
2021-12-07 00:13:31 +00:00
service-postgres:
image: postgres:11
ports: ["5432"]
environment:
- POSTGRES_USER=postgres
- POSTGRES_HOST_AUTH_METHOD=trust
2022-05-20 03:27:43 +00:00
# when:
# path:
# # related config files
# - ".woodpecker/test.yml"
# # go source code
# - "**/*.go"
# - "go.*"
2021-12-07 00:13:31 +00:00
service-mysql:
image: mysql:5.6.27
ports: ["3306"]
environment:
- MYSQL_DATABASE=test
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
2022-05-20 03:27:43 +00:00
# when:
# path:
# # related config files
# - ".woodpecker/test.yml"
# # go source code
# - "**/*.go"
# - "go.*"