Skip to content

Commit 4ec5d0f

Browse files
Add sonar support
1 parent 75fa791 commit 4ec5d0f

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/sonar.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Push to sonarqube
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
12+
jobs:
13+
build:
14+
name: Build and analyze
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
21+
- uses: SonarSource/sonarqube-scan-action@v6
22+
env:
23+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
24+
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
25+
# If you wish to fail your job when the Quality Gate is red, uncomment the
26+
# following lines. This would typically be used to fail a deployment.
27+
# - uses: SonarSource/sonarqube-quality-gate-action@v1
28+
# timeout-minutes: 5
29+
# env:
30+
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

sonar-projet.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sonar.projectKey=ComputerScienceHouse_packet_59f01af3-5f59-474a-b737-c3b1a5fbb4bf
2+
sonar.language=py
3+
sonar.python.version=3.9

0 commit comments

Comments
 (0)