-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (36 loc) · 1.15 KB
/
report.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
on:
push:
branches:
- main
paths:
- "src/**"
- "test/**"
name: coverage report
jobs:
test-coverage:
name: Publish coverage report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup sonarqube
uses: warchant/setup-sonar-scanner@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm run test:report
env:
LOGNAME: username
- run: sonar-scanner -X
-Dsonar.organization=kiegroup
-Dsonar.projectKey=kiegroup_mock-github
-Dsonar.projectName="mock-github"
-Dsonar.sources=$GITHUB_WORKSPACE/src
-Dsonar.host.url=${{ secrets.SONAR_URL }}
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
-Dsonar.tests=test
-Dsonar.testExecutionReportPaths=coverage/test-report.xml
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
-Dsonar.exclusions=test/**,**/__mocks__/**,jest.config.ts,src/action-compiler/mocker/**,src/moctokit/generated/**,src/**/*.types.ts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}