name: Sonar permissions: contents: read pull-requests: write on: push: branches: - production pull_request: branches: - production types: [opened, synchronize, reopened] jobs: sonarqube: name: SonarQube runs-on: node24 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Restore npm cache uses: actions/cache@v3 with: key: npm-${{ hashFiles('package-lock.json') }} path: ~/.npm - name: Setup node environment uses: actions/setup-node@v4 with: node-version: "24" cache: "npm" - name: Install dependencies run: npm ci - name: Save npm cache uses: actions/cache@v3 with: key: npm-${{ hashFiles('package-lock.json') }} path: ~/.npm - name: Run tests and generate coverage run: npm run coverage # continue-on-error: true env: CI: true #- name: SonarQube Scan # uses: SonarSource/sonarqube-scan-action@v6 # env: # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} #