File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 7979 name : Coverage-Report
8080 path : coverage/
8181 retention-days : 1
82+ sonarqube :
83+ name : SonarQube
84+ needs : code-coverage
85+ runs-on : ubuntu-latest
86+ steps :
87+ - uses : actions/checkout@v5
88+ with :
89+ fetch-depth : 0
90+
91+ - name : Setup Python
92+ uses : actions/setup-python@v4
93+ with :
94+ python-version : " 3.12"
95+
96+ - name : Install Dependencies
97+ run : |
98+ pip install -r requirements.txt
99+ pip install pytest-cov
100+
101+ - name : Run Code Coverage
102+ id : coverage
103+ continue-on-error : true
104+ run : pytest --cov=. --cov-report=html --cov-report=xml
105+ - name : SonarQube Scan
106+ uses : SonarSource/sonarqube-scan-action@v5
107+ with :
108+ args : >
109+ -Dsonar.python.coverage.reportPaths=coverage.xml
110+ env :
111+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
112+ SONAR_HOST_URL : https://sonarcloud.io
Original file line number Diff line number Diff line change 1+ sonar.projectKey =karimzakzouk_graduation-project-devops
2+ sonar.organization =karimzakzouk
3+
4+
5+ # This is the name and version displayed in the SonarCloud UI.
6+ sonar.projectName =graduation-project-devops
7+ sonar.projectVersion =1.0
8+
9+
10+ # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
11+ sonar.sources =.
12+
13+ # Encoding of the source code. Default is default system encoding
14+ sonar.sourceEncoding =UTF-8
You can’t perform that action at this time.
0 commit comments