Run tests on main branch (#2576)

We currently don't have coverage information on codecov, the tests must
run for `main` pushes so we can publish them afterwards
This commit is contained in:
qwerty287 2023-10-14 13:04:46 +02:00 committed by GitHub
parent 1b98e58014
commit 55766ea693
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@ variables:
- "go.*"
# schema changes
- "pipeline/schema/**"
event: [pull_request, tag, deployment]
event: [pull_request, tag]
steps:
vendor:
@ -25,7 +25,8 @@ steps:
group: prepare
commands:
- go mod vendor
when: *when
when:
- path: *when_path
lint-pipeline:
image: *golang_image
@ -64,9 +65,12 @@ steps:
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"
@ -80,7 +84,8 @@ steps:
- make test-server
- make test-cli
- make test-lib
when: *when
when:
- path: *when_path
sqlite:
image: *golang_image
@ -89,7 +94,8 @@ steps:
- WOODPECKER_DATABASE_DRIVER=sqlite3
commands:
- make test-server-datastore-coverage
when: *when
when:
- path: *when_path
postgres:
image: *golang_image
@ -123,7 +129,8 @@ steps:
- datastore-coverage.out
token:
from_secret: codecov_token
when: *when
when:
- path: *when_path
failure: ignore
services: