Split PR CI into pre-commit, test, and build workflows
Each Woodpecker workflow file maps to one ci/woodpecker/pr/<file> status context, so break the single build.yaml into three PR workflows to expose three separate PR checks: - .woodpecker/pre-commit.yaml runs the pre-commit hooks via make pre-commit. - .woodpecker/test.yaml runs make test (go test ./...). - .woodpecker/build.yaml keeps only the container dry-run build-check. Add .pre-commit-config.yaml (gofmt/go vet/go unit tests + whitespace/yaml hooks) and a make pre-commit target. docker.yaml (tag release) is unchanged.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.6.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-merge-conflict
|
||||
- id: mixed-line-ending
|
||||
args: [--fix=lf]
|
||||
|
||||
- repo: https://github.com/dnephin/pre-commit-golang
|
||||
rev: v0.5.1
|
||||
hooks:
|
||||
- id: go-fmt
|
||||
- id: go-vet
|
||||
- id: go-unit-tests
|
||||
Reference in New Issue
Block a user