Skip to content

Merge pull request #3268 from swcurran/1.0.1rc1 #165

Merge pull request #3268 from swcurran/1.0.1rc1

Merge pull request #3268 from swcurran/1.0.1rc1 #165

name: Sonar Scan and Coverage
on:
push:
branches:
- main
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
if: github.repository == 'hyperledger/aries-cloudagent-python'
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\/aries-cloudagent-python\/aries-cloudagent-python\//\/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=./