File tree 3 files changed +48
-0
lines changed
3 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 21
21
runs-on : ${{ matrix.os }}
22
22
steps :
23
23
- uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
24
+ with :
25
+ fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
24
26
25
27
- name : Setup Python
26
28
uses : actions/setup-python@master
44
46
with :
45
47
token : ${{ secrets.CODECOV_TOKEN }} # required
46
48
verbose : true # optional (default = false)
49
+
50
+ - name : Install tox and any other packages
51
+ run : pip install tox
52
+ - name : Run tox
53
+ run : tox -e py
54
+
55
+ - name : SonarCloud Scan
56
+ uses : SonarSource/sonarcloud-github-action@master
57
+ env :
58
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
59
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
Original file line number Diff line number Diff line change
1
+ sonar.projectKey =sir-gon_algorithm-exercises-py
2
+ sonar.organization =sir-gon
3
+
4
+ # This is the name and version displayed in the SonarCloud UI.
5
+ # sonar.projectName=algorithm-exercises-py
6
+ # sonar.projectVersion=1.0
7
+
8
+
9
+ # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
10
+ # sonar.sources=src
11
+ sonar.exclusions =**/*test.py,**/__init__.py
12
+
13
+ # Encoding of the source code. Default is default system encoding
14
+ # sonar.sourceEncoding=UTF-8
15
+
16
+ sonar.python.version =3.12
17
+
18
+ # Coverage
19
+ sonar.python.coverage.reportPaths =coverage.xml
Original file line number Diff line number Diff line change
1
+ [tox]
2
+ envlist = py39
3
+ skipsdist = True
4
+
5
+ [testenv]
6
+ deps =
7
+ pytest
8
+ coverage
9
+ commands =
10
+ coverage run -m pytest
11
+ coverage xml
12
+
13
+ [coverage:run]
14
+ relative_files = True
15
+ source = src/
16
+ branch = True
You can’t perform that action at this time.
0 commit comments