mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-12 08:23:48 +02:00
27ad042d4c
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | postgres | major | `11` -> `16` | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/woodpecker-ci/woodpecker). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOS4yIiwidXBkYXRlZEluVmVyIjoiMzcuMTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
153 lines
3.2 KiB
YAML
153 lines
3.2 KiB
YAML
when:
|
|
- event: [pull_request, tag]
|
|
- event: push
|
|
branch:
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
|
- release/*
|
|
|
|
variables:
|
|
- &golang_image 'golang:1.21.3'
|
|
- &when
|
|
- path: &when_path
|
|
# related config files
|
|
- ".woodpecker/test.yml"
|
|
- ".golangci.yml"
|
|
# go source code
|
|
- "**/*.go"
|
|
- "go.*"
|
|
# schema changes
|
|
- "pipeline/schema/**"
|
|
event: [pull_request, tag]
|
|
|
|
steps:
|
|
vendor:
|
|
image: *golang_image
|
|
group: prepare
|
|
commands:
|
|
- go mod vendor
|
|
when:
|
|
- path: *when_path
|
|
|
|
lint-pipeline:
|
|
image: *golang_image
|
|
commands:
|
|
- go run github.com/woodpecker-ci/woodpecker/cmd/cli lint
|
|
when:
|
|
- <<: *when
|
|
- path:
|
|
- ".woodpecker/**"
|
|
- "pipeline/schema/**"
|
|
|
|
dummy-web:
|
|
image: *golang_image
|
|
group: prepare
|
|
commands:
|
|
- mkdir -p web/dist/
|
|
- echo "test" > web/dist/index.html
|
|
when:
|
|
- path: *when_path
|
|
|
|
lint:
|
|
image: *golang_image
|
|
group: test
|
|
commands:
|
|
- make lint
|
|
when: *when
|
|
|
|
check_swagger:
|
|
image: *golang_image
|
|
group: test
|
|
commands:
|
|
- "make generate-swagger"
|
|
- "DIFF=$(git diff | head)"
|
|
- "[ -n \"$DIFF\" ] && { echo \"swagger not up to date, exec 'make generate-swagger' and commit\"; exit 1; } || true"
|
|
when: *when
|
|
|
|
lint-editorconfig:
|
|
image: mstruebing/editorconfig-checker:2.7.2
|
|
group: test
|
|
when:
|
|
- event: [pull_request, tag]
|
|
|
|
lint-license-header:
|
|
image: *golang_image
|
|
group: test
|
|
commands:
|
|
- go install github.com/google/addlicense@latest
|
|
- "addlicense -check -ignore \"vendor/**\" **/*.go"
|
|
when: *when
|
|
|
|
test:
|
|
image: *golang_image
|
|
group: test
|
|
commands:
|
|
- make test-agent
|
|
- make test-server
|
|
- make test-cli
|
|
- make test-lib
|
|
when:
|
|
- path: *when_path
|
|
|
|
sqlite:
|
|
image: *golang_image
|
|
group: test
|
|
environment:
|
|
- WOODPECKER_DATABASE_DRIVER=sqlite3
|
|
commands:
|
|
- make test-server-datastore-coverage
|
|
when:
|
|
- path: *when_path
|
|
|
|
postgres:
|
|
image: *golang_image
|
|
group: test
|
|
environment:
|
|
- WOODPECKER_DATABASE_DRIVER=postgres
|
|
- WOODPECKER_DATABASE_DATASOURCE=host=service-postgres user=postgres dbname=postgres sslmode=disable
|
|
commands:
|
|
- make test-server-datastore
|
|
when: *when
|
|
|
|
mysql:
|
|
image: *golang_image
|
|
group: test
|
|
environment:
|
|
- WOODPECKER_DATABASE_DRIVER=mysql
|
|
- WOODPECKER_DATABASE_DATASOURCE=root@tcp(service-mysql:3306)/test?parseTime=true
|
|
commands:
|
|
- make test-server-datastore
|
|
when: *when
|
|
|
|
codecov:
|
|
pull: true
|
|
image: woodpeckerci/plugin-codecov:next-alpine
|
|
settings:
|
|
files:
|
|
- agent-coverage.out
|
|
- cli-coverage.out
|
|
- coverage.out
|
|
- server-coverage.out
|
|
- datastore-coverage.out
|
|
token:
|
|
from_secret: codecov_token
|
|
when:
|
|
- path: *when_path
|
|
failure: ignore
|
|
|
|
services:
|
|
service-postgres:
|
|
image: postgres:16
|
|
ports: ["5432"]
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
|
when: *when
|
|
|
|
service-mysql:
|
|
image: mysql:8.1.0
|
|
ports: ["3306"]
|
|
environment:
|
|
- MYSQL_DATABASE=test
|
|
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
|
|
when: *when
|