From b5043ee10b145ae242fd3efb8b30c1839e977b2b Mon Sep 17 00:00:00 2001 From: Snider Date: Tue, 28 Apr 2026 23:33:48 +0100 Subject: [PATCH 1/2] =?UTF-8?q?ci:=20woodpecker=20pipeline=20(PHP)=20?= =?UTF-8?q?=E2=80=94=20golangci-lint/eslint/phpstan=20+=20sonar.lthn.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker.yml | 23 +++++++++++++++++++++++ sonar-project.properties | 7 +++++++ 2 files changed, 30 insertions(+) create mode 100644 .woodpecker.yml create mode 100644 sonar-project.properties diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..4c20f6f --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,23 @@ +# Woodpecker CI pipeline. +# Server: ci.lthn.sh. Lint + sonar in parallel, both depend only on clone. +# sonar_token is admin-scoped on the Woodpecker server. + +when: + - event: push + branch: [dev, main] + +steps: + - name: phpstan + image: ghcr.io/phpstan/phpstan:latest + depends_on: [] + commands: + - if [ -f phpstan.neon ] || [ -f phpstan.neon.dist ]; then phpstan analyse --no-progress --memory-limit=1G; else echo 'no phpstan config — sonar-only'; fi + - name: sonar + image: sonarsource/sonar-scanner-cli:latest + depends_on: [] + environment: + SONAR_HOST_URL: https://sonar.lthn.sh + SONAR_TOKEN: + from_secret: sonar_token + commands: + - sonar-scanner diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..cc5a8d8 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,7 @@ +sonar.projectKey=core_php-admin +sonar.projectName=core/php-admin +sonar.sources=. +sonar.exclusions=**/vendor/**,**/third_party/**,**/.tmp/**,**/gomodcache/**,**/node_modules/**,**/dist/**,**/build/**,**/*_test.go,**/*.test.ts,**/*.test.js,**/*.spec.ts,**/*.spec.js +sonar.tests=. +sonar.test.inclusions=**/*_test.go,**/*.test.ts,**/*.test.js,**/*.spec.ts,**/*.spec.js +sonar.test.exclusions=**/vendor/**,**/third_party/**,**/.tmp/**,**/gomodcache/**,**/node_modules/**,**/dist/**,**/build/** From 7e20a7427c9918aafe1750eb2e4a84b10deeafab Mon Sep 17 00:00:00 2001 From: Snider Date: Thu, 30 Apr 2026 13:24:00 +0100 Subject: [PATCH 2/2] ci: trigger first pipeline