add sonar to PR workflow

This commit is contained in:
2024-09-20 08:50:40 -03:00
committed by GitHub
parent a1ef1103d9
commit a7d1bb57d1
+16 -1
View File
@@ -26,11 +26,26 @@ jobs:
#- name: Unit tests
# run: npm run test
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
needs:
- code-checks
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
docker-build:
name: Build Docker image
runs-on: ubuntu-latest
needs:
- code-checks
- sonarcloud
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3