1
0
Files
synapse/.github/workflows/sonarqube.yml
Brendan Abolivier 1ad4c043f5 Update .github/workflows/sonarqube.yml
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-07-01 18:11:27 +02:00

33 lines
1.2 KiB
YAML

name: SonarQube
on:
workflow_run:
workflows: [ "Tests" ]
types:
- completed
concurrency:
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}
cancel-in-progress: true
jobs:
sonarqube:
name: SonarQube
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.workflow_run.head_repository.full_name }}
ref: ${{ github.event.workflow_run.head_branch }} # checkout commit that triggered this workflow
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: matrix-org/setup-python-poetry@v1
- name: SonarCloud Scan
uses: matrix-org/sonarcloud-workflow-action@v2.2
with:
is_pr: ${{ github.event.workflow_run.event == 'pull_request' }}
repository: ${{ github.event.workflow_run.head_repository.full_name }}
version_cmd: 'poetry version --short'
branch: ${{ github.event.workflow_run.head_branch }}
revision: ${{ github.event.workflow_run.head_sha }}
token: ${{ secrets.SONAR_TOKEN }}
coverage_run_id: ${{ github.event.workflow_run.id }}
coverage_workflow_name: tests.yml
skip_checkout: true