Update dependency sonarqube-scanner to v4 #7095
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Static Code Analysis | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
backend: | |
environment: Demo | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 21 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: SonarQube Scan Backend | |
run: ./gradlew test sonarqube | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
frontend: | |
environment: Demo | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Node 21 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '21' | |
- name: SonarQube Frontend | |
run: cd ./frontend && npm install && npm test && npm run sonar | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |