Merge pull request #3372 from swcurran/1.1.1rc0 #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sonar Scan and Coverage | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
sonarcloud: | |
name: SonarCloud | |
runs-on: ubuntu-latest | |
if: github.repository == 'openwallet-foundation/acapy' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Tests | |
uses: ./.github/actions/run-unit-tests | |
with: | |
python-version: "3.12" | |
os: "ubuntu-latest" | |
is_pr: "false" | |
- name: Adjust Test Coverage Source | |
run: | | |
# Need to change source in coverage report because it was generated from another context | |
sed -i 's/\/home\/runner\/work\/acapy\/acapy\//\/github\/workspace\//g' test-reports/coverage.xml | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
args: > | |
-Dsonar.python.coverage.reportPaths=test-reports/coverage.xml | |
-Dsonar.coverage.exclusions=**/tests/**,**/demo/**,**/docs/**,**/docker/**,**/scripts/**,**/scenarios/** | |
-Dsonar.cpd.exclusions=**/tests/**,**/demo/**,**/docs/**,**/docker/**,**/scripts/**,**/scenarios/** | |
-Dsonar.sources=./ |