Skip to content

Commit

Permalink
final changes
Browse files Browse the repository at this point in the history
  • Loading branch information
prayanshchh committed Nov 26, 2024
1 parent eea3f32 commit 220fc83
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,21 +204,25 @@ jobs:
env:
NODE_V8_COVERAGE: './coverage/jest'
run: |
mkdir -p ./.nyc_output
mkdir -p ./coverage/jest
npm run test -- --watchAll=false --coverage
- name: Run Vitest Tests
if: steps.changed-files.outputs.only_changed != 'true'
env:
NODE_V8_COVERAGE: './coverage/vitest'
run: |
mkdir -p ./coverage/vitest
npm run test:vitest:coverage
- name: Merge Coverage Reports
if: steps.changed-files.outputs.only_changed != 'true'
run: |
mkdir -p coverage
npx lcov-result-merger 'coverage/*/lcov.info' > 'coverage/lcov.info'
if ! npx lcov-result-merger 'coverage/*/lcov.info' > 'coverage/lcov.info'; then
echo "Failed to merge coverage reports"
exit 1
fi
- name: TypeScript compilation for changed files
run: |
Expand Down
12 changes: 11 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
export default {
roots: ['<rootDir>/src'],
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/index.tsx'],
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/index.tsx',
'!node_modules',
'!dist',
'!**/*.{spec,test}.{js,jsx,ts,tsx}',
'!coverage/**',
'!**/index.{js,ts}',
'!**/*.d.ts',
'!src/test/**',
'!vitest.config.ts',],
// setupFiles: ['react-app-polyfill/jsdom'],
setupFiles: ['whatwg-fetch'],
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
Expand Down

0 comments on commit 220fc83

Please sign in to comment.