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

fix: attempt to fix 0 coverage #236

Merged
merged 12 commits into from
Sep 24, 2024
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install dependencies
run: npm i -g pnpm && pnpm install
- name: Test and coverage
run: pnpm run test:cov
shell: bash
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/lcov.info
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pnpm run test:cov
pnpm run test:e2e
node merge-coverage.cjs
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@
"mock-reports-back": "nodemon mock/mock-server/mock-reports-backend.js",
"mock-settings-back": "nodemon mock/mock-server/mock-settings-backend.js",
"testing": "-----------------all testing scripts-----------------",
"test:cov": "nx run-many --all --target=test --parallel=6 --ci --coverage",
"test:cov": "nx run-many --target=test --parallel=6 --coverage --verbose --exclude=**/nest-backend && pnpm run test-back:cov && node ./merge-coverage.cjs",
"test-back:cov": "vitest --coverage --root=apps/nest-backend --exclude=**/test/*e2e-spec.ts --watch=false",
"test": "vitest run",
"prepare": "husky",
"test:e2e": "vitest run ./apps/nest-backend/test/app.e2e-spec.ts",
"test:e2e": "vitest --root=apps/nest-backend --watch=false",
"test-back:unit": "vitest --root=apps/nest-backend --exclude=**/test/*e2e-spec.ts --watch=false",
"sentry:sourcemaps": "sentry-cli sourcemaps inject --org guan-xin-wang --project tag-check ./dist/apps/ng-frontend/browser && sentry-cli sourcemaps upload --org guan-xin-wang --project tag-check ./dist/apps/ng-frontend/browser"
},
Expand Down
3 changes: 2 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ sonar.cpd.exclusions=**/*.spec.ts,**/*.spec.tsx,**/*.spec.js,**/*.spec.jsx

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
sonar.typescript.lcov.reportPaths=coverage/lcov.info
sonar.typescript.lcov.reportPaths=./coverage/lcov.info
sonar.javascript.lcov.reportPaths=./coverage/lcov.info
Loading