Skip to content

Update sonarqube.yml #20

Update sonarqube.yml

Update sonarqube.yml #20

Workflow file for this run

name: Build and SonarQube Analysis
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarqube:
runs-on: windows-latest
defaults:
run:
working-directory: PintudosFront # Aquí cambias el directorio base para todos los pasos
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: npm install
- name: Run tests with coverage
run: npm run test -- --coverage || true
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectKey: PINTUDOS-ARSW_PintudosFront
organization: pintando
extraProperties: |
sonar.sources=src
sonar.sourceEncoding=UTF-8
sonar.javascript.lcov.reportPaths=coverage/lcov.info