41 lines
889 B
YAML
41 lines
889 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: ghcr.io/j04n-f/sonar-plugin
|
|
settings:
|
|
sonar_token:
|
|
from_secret: SONAR_TOKEN
|
|
sonar_url:
|
|
from_secret: SONAR_HOST_URL
|
|
sonar_project_key: z-elements
|
|
sonar_project_name: "Z Elements"
|
|
sonar_debug: true
|