Skip to content

Commit

Permalink
reorder code coverage in GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
rustyjux committed Jan 28, 2025
1 parent 29a4f23 commit 9792096
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
50 changes: 26 additions & 24 deletions .github/workflows/aps-cypress-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,32 @@ jobs:
name: code-coverage
path: ${{ github.workspace }}/e2e/coverage

- name: Instrument the code for coverage analysis
if: always()
run: |
# Rewrite the paths as the coverage starts with '../app'!
sed -e 's/..\/app/./g' ./e2e/coverage/lcov.info > lcov.info
#cd src
#npm install --legacy-peer-deps
#npx nyc instrument --compact=false . --in-place
- name: SonarCloud Scan
if: always()
uses: sonarsource/sonarqube-scan-action@master
with:
args: >
-Dsonar.organization=bcgov-oss
-Dsonar.projectKey=aps-portal-e2e
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.projectBaseDir=src
-Dsonar.sources=.
-Dsonar.exclusions=nextapp/**,mocks/**,test/**,tools/**,*.json,*.js
-Dsonar.javascript.lcov.reportPaths=/github/workspace/lcov.info
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Upload Astra scan results
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -116,30 +142,6 @@ jobs:
exit 1
fi
- name: Instrument the code for coverage analysis
run: |
# Rewrite the paths as the coverage starts with '../app'!
sed -e 's/..\/app/./g' ./e2e/coverage/lcov.info > lcov.info
#cd src
#npm install --legacy-peer-deps
#npx nyc instrument --compact=false . --in-place
- name: SonarCloud Scan
uses: sonarsource/sonarqube-scan-action@master
with:
args: >
-Dsonar.organization=bcgov-oss
-Dsonar.projectKey=aps-portal-e2e
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.projectBaseDir=src
-Dsonar.sources=.
-Dsonar.exclusions=nextapp/**,mocks/**,test/**,tools/**,*.json,*.js
-Dsonar.javascript.lcov.reportPaths=/github/workspace/lcov.info
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Set up Python 3.9
if: failure()
uses: actions/setup-python@v2
Expand Down
1 change: 1 addition & 0 deletions gwa-api
Submodule gwa-api added at eed2c5

0 comments on commit 9792096

Please sign in to comment.