Skip to content

feat(#1284): replace govtool-wrapper GA creation in favor of PDF Pillar #964

feat(#1284): replace govtool-wrapper GA creation in favor of PDF Pillar

feat(#1284): replace govtool-wrapper GA creation in favor of PDF Pillar #964

name: SonarQube Static Analysis
on:
push:
paths:
- govtool/frontend/**
- .github/workflows/frontend_sonar_scan.yml
jobs:
execute_sonar_scanner:
name: Execute sonar-scanner on govtool frontend
runs-on: ubuntu-latest
permissions: read-all
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Cache dependencies
uses: actions/cache@v2
with:
path: govtool/frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('govtool/frontend/package-lock.json') }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: "govtool/frontend/.nvmrc"
- name: 🧪 Test
working-directory: govtool/frontend
env:
NODE_OPTIONS: "--max_old_space_size=4096"
run: |
npm install
npm run test:coverage
# Running with docker
#
# - name: Run SonarQube Scanner
# run: |
# docker run --rm \
# -e SONAR_HOST_URL="https://sonarcloud.io" \
# -e SONAR_TOKEN="ec4183646e59dd70c8077acfabe52062ccbea7a9" \
# -v "$(pwd):/usr/src" \
# --workdir=/usr/src/govtool/frontend \
# sonarsource/sonar-scanner-cli:5.0.1
- uses: sonarsource/sonarqube-scan-action@master
with:
projectBaseDir: govtool/frontend
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: https://sonarcloud.io