Skip to content

Commit 2cfd05f

Browse files
authored
Zowe Suite v3.4.0
2 parents 6868f2b + e56c270 commit 2cfd05f

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/sonarqube.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: SonarQube Quality Check
2+
3+
on:
4+
push:
5+
branches: [ "v3.x/staging" ]
6+
pull_request:
7+
branches: [ "v3.x/staging" ]
8+
types: [opened, synchronize, reopened, ready_for_review]
9+
10+
11+
jobs:
12+
analyze-pr:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
defaults:
18+
run:
19+
working-directory: webClient
20+
21+
steps:
22+
- name: Checkout PR head with limited history
23+
uses: actions/checkout@v4
24+
with:
25+
ref: v3.x/staging
26+
27+
- name: Use Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: "20"
31+
32+
- name: Install npm
33+
run: npm install
34+
35+
- name: Test with coverage (Jest)
36+
run: npm test --if-present -- --coverage
37+
env:
38+
CI: true
39+
40+
- name: SonarQube Scan
41+
continue-on-error: false
42+
uses: sonarsource/sonarqube-scan-action@v5
43+
env:
44+
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
45+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
46+
with:
47+
args: >
48+
-Dsonar.projectKey=zowe_sample-react-app
49+
-Dsonar.organization=zowe
50+
-Dsonar.sources=webClient
51+
-Dsonar.tests=webClient/src/
52+
-Dsonar.test.inclusions=**/*.(spec|test).ts,**/*.(spec|test).tsx,**/*.(spec|test).js,**/*.(spec|test).jsx
53+
-Dsonar.exclusions=**/node_modules/**,**/dist/**,**/build/**,**/*.d.ts
54+
-Dsonar.javascript.lcov.reportPaths=webClient/coverage/lcov.info
55+
-Dsonar.qualitygate.wait=true
56+
-Dsonar.qualitygate.timeout=600

0 commit comments

Comments
 (0)