update pipeline and added coverage test
Backend SonarQube Check testing / sonar-check (push) Successful in 5m23s
Details
Backend SonarQube Check testing / sonar-check (push) Successful in 5m23s
Details
This commit is contained in:
parent
e445b22931
commit
30428741d5
|
|
@ -13,9 +13,17 @@ jobs:
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set image tag
|
- name: Setup Node.js
|
||||||
run: |
|
uses: actions/setup-node@v4
|
||||||
echo "IMAGE_TAG=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Run tests with coverage
|
||||||
|
run: npm test
|
||||||
|
|
||||||
- name: SonarQube Scan
|
- name: SonarQube Scan
|
||||||
uses: sonarsource/sonarqube-scan-action@v2
|
uses: sonarsource/sonarqube-scan-action@v2
|
||||||
|
|
@ -24,8 +32,9 @@ jobs:
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BACKEND_TEST }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BACKEND_TEST }}
|
||||||
with:
|
with:
|
||||||
args: >
|
args: >
|
||||||
-Dsonar.projectKey=csa-backend-production
|
-Dsonar.projectKey=csa-backend-test
|
||||||
-Dsonar.sources=.
|
-Dsonar.sources=.
|
||||||
|
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
|
||||||
|
|
||||||
- name: SonarQube Quality Gate
|
- name: SonarQube Quality Gate
|
||||||
uses: sonarsource/sonarqube-quality-gate-action@v1
|
uses: sonarsource/sonarqube-quality-gate-action@v1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue