Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,11 @@ jobs:
- name: Test with tox
run: tox -- --with-kerberos

- name: Append python version to coverage data
run: mv ./coverage.xml ./coverage.${{ matrix.python-version }}.xml
- name: Remove platform-specific paths and append platform to coverage file name
run: |
sed -i 's/\.tox\/py[0-9]\+\/lib\/python3\.[0-9]\+\/site-packages/src/g' coverage.xml
sed -i 's/\.tox\.py3[0-9]\+\.lib\.python3\.[0-9]\+\.site-packages\.//g' coverage.xml
mv ./coverage.xml ./coverage.${{ matrix.python-version }}.xml

- name: Store coverage data
uses: actions/upload-artifact@v2
Expand All @@ -106,23 +109,26 @@ jobs:

- uses: actions/download-artifact@v2
with:
path: ~/coverage-reports
path: coverage-reports

- name: List coverage reports
run: |
cd ~/coverage-reports
cp ./**/coverage*.xml ./
cp coverage-reports/**/coverage*.xml ./

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=pyansys-test
-Dsonar.projectKey=pyansys-test-openapi-common
-Dsonar.python.version=3.7,3.8,3.9,3.10
-Dsonar.python.version=3
-Dsonar.sources=src
-Dsonar.python.coverage.reportPaths=coverage*.xml
-Dsonar.core.codeCoveragePlugin=cobertura
-Dsonar.dynamicAnalysis=reuseReports

build:
name: Build
Expand Down