Merge pull request #8 from matchms/add_graphml #10
This file contains hidden or 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: SonarCloud Scan | ||
| on: | ||
| workflow_run: | ||
| workflows: ["CI build and Python-System-matrix tests"] | ||
| types: | ||
| - completed | ||
| jobs: | ||
| sonarcloud-pip: | ||
| name: SonarCloud Scan on pip build | ||
| runs-on: ubuntu-latest | ||
| if: github.event.workflow_run.conclusion == 'success' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| repository: ${{ github.event.workflow_run.head_repository.full_name }} | ||
| ref: ${{ github.event.workflow_run.head_branch }} | ||
| fetch-depth: 0 | ||
| - name: Fetch coverage report from artifact | ||
| uses: dawidd6/action-download-artifact@v6 | ||
| with: | ||
| workflow: CI_build.yml | ||
| name: sonarcloud-data-pip | ||
| path: ${{ github.workspace }} | ||
| - name: Get PR metadata from json | ||
| run: | | ||
| echo "PR_NUMBER=$(jq -r '.pr_number' pr_metadata.json)" >> $GITHUB_ENV | ||
| echo "HEAD_REF=$(jq -r '.head_ref' pr_metadata.json)" >> $GITHUB_ENV | ||
| echo "BASE_REF=$(jq -r '.base_ref' pr_metadata.json)" >> $GITHUB_ENV | ||
| - name: SonarCloud Scan | ||
| uses: sonarsource/sonarcloud-github-action@main | ||
| env: | ||
| GITHUB_TOKEN: ${{ secret.REPO_TOKEN }} | ||
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
| with: | ||
| args: > | ||
| -Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }} | ||
| -Dsonar.pullrequest.key=${{ env.PR_NUMBER }} | ||
| -Dsonar.pullrequest.branch=${{ env.HEAD_REF }} | ||
| -Dsonar.pullrequest.base=${{ env.BASE_REF }} | ||