Files
z-elements/.woodpecker/test-pr.yml
Mitch Hijlkema 051bb6fd08
Some checks failed
ci/woodpecker/manual/test-pr Pipeline failed
feat: add support for SonarQube
2026-02-26 11:40:04 +01:00

43 lines
1023 B
YAML

# Runs on every pull request to build and test the libraries.
# Also can run manually to check if tests are passing whenever
when:
- event: pull_request
- event: manual
clone:
git:
image: woodpeckerci/plugin-git
settings:
depth: 0
tags: true
steps:
- name: install
image: node:22
commands:
- npm ci --legacy-peer-deps
- name: build
image: node:22
commands:
- npx nx run-many -t build --projects="reviews-stars"
- name: test
image: node:22
commands:
- npx nx run-many -t test --code-coverage --passWithNoTests --projects="reviews-stars"
- name: sonar
image: sonarsource/sonar-scanner-cli:latest
environment:
SONAR_HOST_URL:
from_secret: SONAR_HOST_URL
SONAR_TOKEN:
from_secret: SONAR_TOKEN
commands:
- sonar-scanner
-Dsonar.pullrequest.key=${CI_COMMIT_PULL_REQUEST}
-Dsonar.pullrequest.branch=${CI_COMMIT_SOURCE_BRANCH}
-Dsonar.pullrequest.base=${CI_COMMIT_TARGET_BRANCH}