feat: Restrict the CI to Go files
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
PapaTutuWawa committed 2024-01-13 17:58:21 +01:00
1 parent 3af531fdcc
commit 183e77ea61
1 file changed
+10 -1
+10 -1
View File
@@ -1,11 +1,20 @@
x-anchors:
golang_filter: &golang_filter
- path:
include: [ "**/*.go" ]
steps: steps:
build: build:
image: "golang:1.21.5-alpine" image: "golang:1.21.5-alpine"
commands: commands:
- go build ./cmd/rio - go build ./cmd/rio
- go test $(go list ./... | grep -v /vendor/) - go test $(go list ./... | grep -v /vendor/)
when:
- <<: *golang_filter
lint: lint:
image: "golang:1.21.5-alpine" image: "golang:1.21.5-alpine"
commands: commands:
- go fmt $(go list ./... | grep -v /vendor/) - go fmt $(go list ./... | grep -v /vendor/)
- go vet $(go list ./... | grep -v /vendor/) - go vet $(go list ./... | grep -v /vendor/)
when:
- <<: *golang_filter