Fix path schema (#723)

- allow array for path
- remove "include:" as it is default case
- run tests on schema changes too
This commit is contained in:
6543
2022-01-29 14:26:00 +01:00
committed by GitHub
parent 062579d66f
commit 95ce87fa1b
4 changed files with 98 additions and 92 deletions

View File

@@ -11,7 +11,6 @@ pipeline:
- yarn build
when:
path:
include:
# related config files
- ".woodpecker/binaries.yml"
- "nfpm/*.yml"
@@ -28,7 +27,6 @@ pipeline:
- make release-server
when:
path:
include:
# related config files
- ".woodpecker/binaries.yml"
- "nfpm/*.yml"
@@ -60,7 +58,6 @@ pipeline:
- make release-cli
when:
path:
include:
# related config files
- ".woodpecker/binaries.yml"
- "nfpm/*.yml"
@@ -75,7 +72,6 @@ pipeline:
- make bundle
when:
path:
include:
# related config files
- ".woodpecker/binaries.yml"
- "nfpm/*.yml"
@@ -91,7 +87,6 @@ pipeline:
- make release-checksums
when:
path:
include:
# related config files
- ".woodpecker/binaries.yml"
- "nfpm/*.yml"

View File

@@ -6,12 +6,13 @@ pipeline:
- echo "test" > web/dist/index.html
when:
path:
include:
# related config files
- ".woodpecker/test.yml"
# go source code
- "**/*.go"
- "go.*"
# schema changes
- "pipeline/schema/**"
lint:
image: golang:1.16
@@ -20,7 +21,6 @@ pipeline:
- make lint
when:
path:
include:
# related config files
- ".woodpecker/test.yml"
- ".golangci.yml"
@@ -38,12 +38,13 @@ pipeline:
- make test-lib
when:
path:
include:
# related config files
- ".woodpecker/test.yml"
# go source code
- "**/*.go"
- "go.*"
# schema changes
- "pipeline/schema/**"
sqlite:
image: golang:1.16
@@ -54,7 +55,6 @@ pipeline:
- make test-server-datastore
when:
path:
include:
# related config files
- ".woodpecker/test.yml"
# go source code
@@ -71,7 +71,6 @@ pipeline:
- make test-server-datastore
when:
path:
include:
# related config files
- ".woodpecker/test.yml"
# go source code
@@ -88,7 +87,6 @@ pipeline:
- make test-server-datastore
when:
path:
include:
# related config files
- ".woodpecker/test.yml"
# go source code
@@ -104,7 +102,6 @@ services:
- POSTGRES_HOST_AUTH_METHOD=trust
when:
path:
include:
# related config files
- ".woodpecker/test.yml"
# go source code
@@ -119,7 +116,6 @@ services:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
when:
path:
include:
# related config files
- ".woodpecker/test.yml"
# go source code

View File

@@ -79,6 +79,15 @@ pipeline:
when:
path: "folder/**"
when-path-array:
image: alpine
commands:
- echo "test"
when:
path:
- "folder/**"
- "**/*.c"
when-path-include-exclude:
image: alpine
commands:

View File

@@ -260,6 +260,12 @@
"description": "Execute a step only on commit with certain files added/removed/modified. Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#environment",
"oneOf": [
{ "type": "string" },
{
"type" :"array",
"items": {
"type": "string"
}
},
{
"type": "object",
"properties": {