Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generate coverage and pass to sonar cloud #68

Merged
merged 3 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
with:
commands: |
npm ci
npm run test
npm run test:cov
dir: frontend
node_version: "18"
sonar_args: >
Expand All @@ -52,7 +52,8 @@ jobs:
-Dsonar.tests.inclusions=**/*spec.ts
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
sonar_token: ${{ secrets[matrix.token] }}
triggers: ${{ matrix.triggers }}
# Only use triggers for PRs
triggers: ${{ github.event_name == 'pull_request' && matrix.triggers || '' }}

# https://github.com/marketplace/actions/aqua-security-trivy
trivy:
Expand Down
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"test:cov": "npm run test -- --coverage --watchAll=false",
"eject": "react-scripts eject",
"lint": "eslint src --ext .ts",
"lint:fix": "npm run lint -- --fix"
Expand Down