My-Weekly-ToDo-List/.github/workflows/sonarqube.yml
mARTin-B78 c120a0ad7f
Some checks are pending
Playwright Tests / test (push) Waiting to run
Test and SonarQube / quality (push) Waiting to run
chore: add SonarQube quality checks
2026-09-03 16:24:41 +02:00

48 lines
1.1 KiB
YAML

name: Test and SonarQube
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
# Full history so SonarQube can read blame data for new-code detection.
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
- name: Install dependencies
run: npm ci
- name: Type check
run: npm run type-check
- name: Lint
run: npm run lint
- name: SonarQube scan
uses: SonarSource/sonarqube-scan-action@v8.1.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
with:
args: >-
-Dsonar.projectKey=My-Weekly-ToDo-List
-Dsonar.sources=src,scripts
-Dsonar.exclusions=**/node_modules/**,**/.next/**,**/*.spec.ts
-Dsonar.qualitygate.wait=true
-Dsonar.qualitygate.timeout=300