File tree Expand file tree Collapse file tree 1 file changed +10
-26
lines changed Expand file tree Collapse file tree 1 file changed +10
-26
lines changed Original file line number Diff line number Diff line change 1
- name : sonarcloud
2
-
1
+ name : Build
3
2
on :
4
3
push :
5
4
branches :
6
- - main
5
+ - main
7
6
pull_request :
8
- branches :
9
- - main
10
-
7
+ types : [opened, synchronize, reopened]
11
8
jobs :
12
-
13
- sonarcloud :
14
- name : SonarCloud
9
+ sonarqube :
10
+ name : SonarQube
15
11
runs-on : ubuntu-latest
16
12
steps :
17
- - uses : actions/checkout@v3
13
+ - uses : actions/checkout@v4
18
14
with :
19
15
fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
20
- - name : Set up Python
21
- uses : actions/setup-python@v3
22
- with :
23
- python-version : " 3.10"
24
- - name : Install dependencies
25
- run : |
26
- python -m pip install --upgrade pip
27
- python -m pip install .[dev]
28
- - name : Run unit tests with coverage
29
- run : pytest --cov --cov-report term --cov-report xml
30
- - name : Correct coverage paths
31
- run : sed -i "s+$PWD/++g" coverage.xml
32
- - name : SonarCloud Scan
33
- uses : SonarSource/sonarcloud-github-action@master
16
+ - name : SonarQube Scan
17
+ uses : SonarSource/sonarqube-scan-action@v4
34
18
env :
35
- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN }}
36
- SONAR_TOKEN : ${{secrets.SONAR_TOKEN }}
19
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
20
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
You can’t perform that action at this time.
0 commit comments