File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212jobs :
1313 build :
14-
1514 runs-on : ubuntu-latest
1615 strategy :
1716 fail-fast : false
2019
2120 steps :
2221 - uses : actions/checkout@v3
22+ - run : git fetch origin develop
2323 - name : Set up Python ${{ matrix.python-version }}
2424 uses : actions/setup-python@v3
2525 with :
6161 - name : Test with pytest
6262 run : |
6363 source .venv/bin/activate
64- pytest
64+ pytest --cov-report=xml --junitxml=xunit-results.xml
65+ coverage xml
66+ - name : Upload artifacts
67+ uses : actions/upload-artifact@v3
68+ with :
69+ name : test-results
70+ path : |
71+ coverage.xml
72+ xunit-results.xml
73+ - name : SonarCloud Scan
74+ uses : SonarSource/sonarcloud-github-action@master
75+ env :
76+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
77+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
78+ with :
79+ args : >
80+ -Dsonar.organization=fgmacedo
81+ -Dsonar.projectKey=fgmacedo_python-statemachine
82+ -Dsonar.python.coverage.reportPaths=coverage.xml
83+ -Dsonar.sources=statemachine/
84+ -Dsonar.test.exclusions=tests/**
85+ -Dsonar.tests=tests/
86+ -Dsonar.python.version=3
87+ -Dsonar.verbose=false
Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ convention = "google"
135135
136136[tool .coverage .run ]
137137branch = true
138+ relative_files = true
138139data_file = " .coverage"
139140source = [
140141 " statemachine" ,
You can’t perform that action at this time.
0 commit comments