Skip to content

Commit e678b2b

Browse files
committed
ci: woodpecker pipeline (PHP) — golangci-lint/eslint/phpstan + sonar.lthn.sh
1 parent c243cea commit e678b2b

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

.woodpecker.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Woodpecker CI pipeline.
2+
# Server: ci.lthn.sh. Lint + sonar in parallel, both depend only on clone.
3+
# sonar_token is admin-scoped on the Woodpecker server.
4+
5+
when:
6+
- event: push
7+
branch: [dev, main]
8+
9+
steps:
10+
- name: phpstan
11+
image: ghcr.io/phpstan/phpstan:latest
12+
depends_on: []
13+
commands:
14+
- if [ -f phpstan.neon ] || [ -f phpstan.neon.dist ]; then phpstan analyse --no-progress --memory-limit=1G; else echo 'no phpstan config — sonar-only'; fi
15+
- name: sonar
16+
image: sonarsource/sonar-scanner-cli:latest
17+
depends_on: []
18+
environment:
19+
SONAR_HOST_URL: https://sonar.lthn.sh
20+
SONAR_TOKEN:
21+
from_secret: sonar_token
22+
commands:
23+
- sonar-scanner

sonar-project.properties

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
sonar.projectKey=core_php
2+
sonar.projectName=core/php
3+
sonar.sources=.
4+
sonar.exclusions=**/vendor/**,**/third_party/**,**/.tmp/**,**/gomodcache/**,**/node_modules/**,**/dist/**,**/build/**,**/*_test.go,**/*.test.ts,**/*.test.js,**/*.spec.ts,**/*.spec.js
5+
sonar.tests=.
6+
sonar.test.inclusions=**/*_test.go,**/*.test.ts,**/*.test.js,**/*.spec.ts,**/*.spec.js
7+
sonar.test.exclusions=**/vendor/**,**/third_party/**,**/.tmp/**,**/gomodcache/**,**/node_modules/**,**/dist/**,**/build/**

0 commit comments

Comments
 (0)