diff --git a/.github/workflows/api-audit-test-coverage-response.yml b/.github/workflows/api-audit-test-coverage-response.yml index 7cbff889e..201d4495b 100644 --- a/.github/workflows/api-audit-test-coverage-response.yml +++ b/.github/workflows/api-audit-test-coverage-response.yml @@ -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 @@ -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 @@ -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 @@ -220,4 +224,4 @@ jobs: # - name: Check Quality Gate # uses: sonarsource/sonarqube-quality-gate-action@master # env: - # SONAR_TOKEN: \ No newline at end of file + # SONAR_TOKEN: diff --git a/.github/workflows/client-sonarcloud.yml b/.github/workflows/client-sonarcloud.yml index dd84c6960..c709a3675 100644 --- a/.github/workflows/client-sonarcloud.yml +++ b/.github/workflows/client-sonarcloud.yml @@ -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 @@ -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: @@ -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: \ No newline at end of file + # SONAR_TOKEN: