From 5925644ad363cbbfc5a83ac86fdcea5495cdca11 Mon Sep 17 00:00:00 2001 From: tobi Date: Tue, 13 May 2025 11:23:30 +0000 Subject: [PATCH] [chore] Update woodpecker to catch `len(fromJSON(CI_PIPELINE_FILES)) == 0` (#4177) This'll hopefully catch some straggler occurrences of the tests not wanting to run. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4177 Co-authored-by: tobi Co-committed-by: tobi --- .woodpecker/pr.yaml | 24 +++++++++--------------- .woodpecker/snapshot.yaml | 11 +++-------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/.woodpecker/pr.yaml b/.woodpecker/pr.yaml index 78c7ccc43..7a392ad50 100644 --- a/.woodpecker/pr.yaml +++ b/.woodpecker/pr.yaml @@ -16,12 +16,9 @@ steps: # https://woodpecker-ci.org/docs/usage/environment#built-in-environment-variables - evaluate: >- (not ("CI_PIPELINE_FILES" in $env)) || - len(CI_PIPELINE_FILES) == 0 || - any(fromJSON(CI_PIPELINE_FILES), { - # startsWith "internal/" || - # startsWith "cmd/" || - # startsWith "testrig/" - }) + CI_PIPELINE_FILES == "[]" || + any(fromJSON(CI_PIPELINE_FILES), { # startsWith "internal/" || # startsWith "cmd/" || # startsWith "testrig/" }) || + len(fromJSON(CI_PIPELINE_FILES)) == 0 # We use golangci-lint for linting. # See: https://golangci-lint.run/ @@ -60,13 +57,9 @@ steps: # https://woodpecker-ci.org/docs/usage/environment#built-in-environment-variables - evaluate: >- (not ("CI_PIPELINE_FILES" in $env)) || - len(CI_PIPELINE_FILES) == 0 || - any(fromJSON(CI_PIPELINE_FILES), { - # startsWith "internal/" || - # startsWith "cmd/" || - # startsWith "testrig/" || - # startsWith "vendor/" - }) + CI_PIPELINE_FILES == "[]" || + any(fromJSON(CI_PIPELINE_FILES), { # startsWith "internal/" || # startsWith "cmd/" || # startsWith "testrig/" || # startsWith "vendor/" }) || + len(fromJSON(CI_PIPELINE_FILES)) == 0 image: golang:1.23-alpine pull: true @@ -116,8 +109,9 @@ steps: # https://woodpecker-ci.org/docs/usage/environment#built-in-environment-variables - evaluate: >- (not ("CI_PIPELINE_FILES" in $env)) || - len(CI_PIPELINE_FILES) == 0 || - any(fromJSON(CI_PIPELINE_FILES), { # startsWith "web/source/" }) + CI_PIPELINE_FILES == "[]" || + any(fromJSON(CI_PIPELINE_FILES), { # startsWith "web/source/" }) || + len(fromJSON(CI_PIPELINE_FILES)) == 0 image: node:lts-alpine pull: true diff --git a/.woodpecker/snapshot.yaml b/.woodpecker/snapshot.yaml index de1e9f57f..17afd96b5 100644 --- a/.woodpecker/snapshot.yaml +++ b/.woodpecker/snapshot.yaml @@ -24,14 +24,9 @@ steps: # https://woodpecker-ci.org/docs/usage/environment#built-in-environment-variables - evaluate: >- (not ("CI_PIPELINE_FILES" in $env)) || - any(fromJSON(CI_PIPELINE_FILES), { - # startsWith "internal/" || - # startsWith "cmd/" || - # startsWith "testrig/" || - # startsWith "vendor/" || - # startsWith "web/" || - # == "Dockerfile" - }) + CI_PIPELINE_FILES == "[]" || + any(fromJSON(CI_PIPELINE_FILES), { # startsWith "internal/" || # startsWith "cmd/" || # startsWith "testrig/" || # startsWith "vendor/" || # startsWith "web/" || # == "Dockerfile" }) || + len(fromJSON(CI_PIPELINE_FILES)) == 0 # https://codeberg.org/superseriousbusiness/gotosocial-woodpecker-build image: superseriousbusiness/gotosocial-woodpecker-build:0.11.0