Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/SonarQube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: SonarQube Quality Check

on:
push:
branches: [ "v3.x/staging" ]
pull_request:
branches: [ "v3.x/staging" ]
types: [opened, synchronize, reopened, ready_for_review]


jobs:
analyze-pr:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
defaults:
run:
working-directory: webClient

steps:
- name: Checkout PR head with limited history
uses: actions/checkout@v4
with:
ref: v3.x/staging

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install npm
run: npm install

- name: Test with coverage (Jest)
run: npm test --if-present -- --coverage
env:
CI: true

- name: SonarQube Scan
continue-on-error: false
uses: sonarsource/sonarqube-scan-action@v5
env:
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.projectKey=zowe_sample-angular-app
-Dsonar.organization=zowe
-Dsonar.sources=webClient,nodeServer,zssServer
-Dsonar.tests=webClient/src/app
-Dsonar.test.inclusions=**/*.(spec|test).ts,**/*.(spec|test).tsx,**/*.(spec|test).js,**/*.(spec|test).jsx
-Dsonar.exclusions=**/node_modules/**,**/dist/**,**/build/**,**/*.d.ts
-Dsonar.javascript.lcov.reportPaths=webClient/coverage/lcov.info
-Dsonar.qualitygate.wait=true
-Dsonar.qualitygate.timeout=600
Loading