Skip to content

Commit

Permalink
improved action triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
Matte22 committed Oct 30, 2023
1 parent 713c892 commit 6037e88
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/api-audit-test-coverage-response.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
- "api/source/**"
- "test/api/**"
- ".github/workflows/api-audit-test-coverage-response.yml"
paths-ignore:
- "api/source/node_modules/**"
push:
branches:
- main
Expand All @@ -17,6 +19,8 @@ on:
- "api/source/**"
- "test/api/**"
- ".github/workflows/api-audit-test-coverage-response.yml"
paths-ignore:
- "api/source/node_modules/**"

env:
STIGMAN_API_PORT: 64001
Expand Down Expand Up @@ -205,7 +209,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@v2.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
SONAR_TOKEN: ${{ secrets.API_SONAR_TOKEN }} # Needed to push to SonarCloud
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_API }} # Needed to push to SonarCloud
with:
# Additional arguments for the sonarcloud scanner
projectBaseDir: ./api/source
Expand All @@ -220,4 +224,4 @@ jobs:
# - name: Check Quality Gate
# uses: sonarsource/sonarqube-quality-gate-action@master
# env:
# SONAR_TOKEN:
# SONAR_TOKEN:
22 changes: 15 additions & 7 deletions .github/workflows/client-sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@ on:
branches:
- main
paths:
- "client/src/**"
- "client/src/js/**"
- "client/src/css/**"
- "client/src/serviceWorker.js"
- ".github/workflows/client-sonarcloud.yml"
paths-ignore:
- "client/src/js/third-party/node_modules/**"
push:
branches:
- main
paths:
- "client/src/**"
- "client/src/js/**"
- "client/src/css/**"
- "client/src/serviceWorker.js"
- ".github/workflows/client-sonarcloud.yml"
paths-ignore:
- "client/src/js/third-party/node_modules/**"

permissions:
pull-requests: read # allows SonarCloud to decorate PRs with analysis results
Expand All @@ -22,6 +30,7 @@ jobs:
name: SonarCloud Analysis client
runs-on: ubuntu-latest
steps:
#checkout the repo
- name: Checkout repository
uses: actions/checkout@v3
with:
Expand All @@ -30,19 +39,18 @@ jobs:
uses: SonarSource/sonarcloud-github-action@v2.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
SONAR_TOKEN: ${{ secrets.CLIENT_SONAR_TOKEN }} # Needed to push to SonarCloud
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_CLIENT }} # Needed to push to SonarCloud
with:
projectBaseDir: ./client/src
# Additional arguments for the sonarcloud scanner
args:
-Dsonar.projectKey=nuwcdivnpt_stig-manager-client
args: -Dsonar.projectKey=nuwcdivnpt_stig-manager-client
-Dsonar.projectName=nuwcdivnpt_stig-manager-client
-Dsonar.organization=nuwcdivnpt
-Dsonar.inclusions=**/*.js,**/*.html
-Dsonar.inclusions=**/*.js,**/*.html,**/*.css
-Dsonar.exclusions=**/node_modules/**

# This will fail the action if Quality Gate fails (leaving out for now )
# - name: Check Quality Gate
# uses: sonarsource/sonarqube-quality-gate-action@master
# env:
# SONAR_TOKEN:
# SONAR_TOKEN:

0 comments on commit 6037e88

Please sign in to comment.