2022-05-02 20:34:31 +00:00
|
|
|
|
name: SonarQube
|
|
|
|
|
on:
|
|
|
|
|
workflow_run:
|
|
|
|
|
workflows: [ "Tests" ]
|
|
|
|
|
types:
|
|
|
|
|
- completed
|
2022-05-13 22:25:50 +00:00
|
|
|
|
concurrency:
|
2022-05-24 22:23:49 +00:00
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
2022-05-13 22:25:50 +00:00
|
|
|
|
cancel-in-progress: true
|
2022-05-02 20:34:31 +00:00
|
|
|
|
jobs:
|
2022-05-13 22:25:50 +00:00
|
|
|
|
prdetails:
|
|
|
|
|
name: ℹ️ PR Details
|
|
|
|
|
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request'
|
|
|
|
|
uses: matrix-org/matrix-js-sdk/.github/workflows/pr_details.yml@develop
|
|
|
|
|
with:
|
|
|
|
|
owner: ${{ github.event.workflow_run.head_repository.owner.login }}
|
|
|
|
|
branch: ${{ github.event.workflow_run.head_branch }}
|
2022-05-03 13:46:38 +00:00
|
|
|
|
|
2022-05-13 22:25:50 +00:00
|
|
|
|
sonarqube:
|
|
|
|
|
name: 🩻 SonarQube
|
|
|
|
|
needs: prdetails
|
|
|
|
|
# Only wait for prdetails if it isn't skipped
|
|
|
|
|
if: |
|
|
|
|
|
always() &&
|
|
|
|
|
(needs.prdetails.result == 'success' || needs.prdetails.result == 'skipped') &&
|
|
|
|
|
github.event.workflow_run.conclusion == 'success'
|
|
|
|
|
uses: matrix-org/matrix-js-sdk/.github/workflows/sonarcloud.yml@develop
|
|
|
|
|
with:
|
|
|
|
|
repo: ${{ github.event.workflow_run.head_repository.full_name }}
|
|
|
|
|
pr_id: ${{ needs.prdetails.outputs.pr_id }}
|
|
|
|
|
head_branch: ${{ needs.prdetails.outputs.head_branch || github.event.workflow_run.head_branch }}
|
|
|
|
|
base_branch: ${{ needs.prdetails.outputs.base_branch }}
|
|
|
|
|
revision: ${{ github.event.workflow_run.head_sha }}
|
|
|
|
|
coverage_workflow_name: tests.yml
|
|
|
|
|
coverage_run_id: ${{ github.event.workflow_run.id }}
|
|
|
|
|
secrets:
|
|
|
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|