File tree 2 files changed +40
-13
lines changed
2 files changed +40
-13
lines changed Original file line number Diff line number Diff line change 36
36
path : coverage
37
37
- name : Upload code coverage report to codecov.io and comment in pull request
38
38
uses : codecov/codecov-action@v3
39
- - name : Upload Sonar report to sonarcloud.io and comment in pull request
40
- uses : sonarsource/sonarcloud-github-action@master
41
- env :
42
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43
- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
44
- with :
45
- args : >
46
- -Dsonar.organization=adobeinc
47
- -Dsonar.projectKey=adobe_aem-react-editable-components
48
- -Dsonar.sources=src
49
- -Dsonar.tests=test
50
- -Dsonar.javascript.lcov.reportPaths=dist/coverage/lcov.info
51
- -Dsonar.coverage.exclusions=src/types.ts
Original file line number Diff line number Diff line change
1
+ name : Sonar
2
+ on :
3
+ workflow_run :
4
+ workflows : ["Continuous Integration"]
5
+ types :
6
+ - completed
7
+ jobs :
8
+ sonar :
9
+ name : Sonar
10
+ runs-on : ubuntu-latest
11
+ if : github.event.workflow_run.conclusion == 'success'
12
+ steps :
13
+ - name : Checkout source code
14
+ uses : actions/checkout@v2
15
+ with :
16
+ repository : ${{ github.event.workflow_run.head_repository.full_name }}
17
+ ref : ${{ github.event.workflow_run.head_branch }}
18
+ fetch-depth : 0
19
+ - name : " Get PR information"
20
+ uses : potiuk/get-workflow-origin@v1_3
21
+ id : source-run-info
22
+ with :
23
+ token : ${{ secrets.GITHUB_TOKEN }}
24
+ sourceRunId : ${{ github.event.workflow_run.id }}
25
+ - name : Upload Sonar report to sonarcloud.io and comment in pull request
26
+ uses : sonarsource/sonarcloud-github-action@master
27
+ env :
28
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
30
+ with :
31
+ args : >
32
+ -Dsonar.organization=adobeinc
33
+ -Dsonar.projectKey=adobe_aem-react-editable-components
34
+ -Dsonar.sources=src
35
+ -Dsonar.tests=test
36
+ -Dsonar.javascript.lcov.reportPaths=dist/coverage/lcov.info
37
+ -Dsonar.coverage.exclusions=src/types.ts
38
+ -Dsonar.pullrequest.key=${{ steps.source-run-info.outputs.pullRequestNumber }}
39
+ -Dsonar.pullrequest.branch=${{ steps.source-run-info.outputs.sourceHeadBranch }}
40
+ -Dsonar.pullrequest.base=${{ steps.source-run-info.outputs.targetBranch }}
You can’t perform that action at this time.
0 commit comments