Skip to content

Commit 3a2ba14

Browse files
committed
More codecov fixes
1 parent 8a5a241 commit 3a2ba14

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

packages/config/src/jest/config.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,17 @@ const createJestTSConfig = (
2222
* No need to manually run yarn build all the time.
2323
* This resolve packages for ts-jest so typescript compilation happens in-memory.
2424
*/
25-
...(process.env.CI === 'true' && isRootConfig
25+
...(process.env.CI === 'true'
2626
? {
2727
collectCoverage: true,
2828
coverageReporters: ['json'],
29+
collectCoverageFrom: [
30+
'src/**/*.{js,jsx,ts,tsx}',
31+
'!src/**/*.test.{js,jsx,ts,tsx}',
32+
// Exclude test files "!src/**/index.{js,ts}",
33+
// Exclude index files
34+
],
35+
coverageDirectory: '<rootDir>/coverage',
2936
}
3037
: {}),
3138
moduleNameMapper: moduleMap,

scripts/clean.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
# Clear build artifacts and build cache
33

4-
find . \( -name ".turbo" -o -name "dist" -o -name ".next" -o -name "tsconfig.tsbuildinfo" \) ! -path "*/node_modules/*" -print0 | xargs -0 rm -rf
4+
find . \( -name ".turbo" -o -name "dist" -o -name ".next" -o -name "tsconfig.tsbuildinfo" -o -name "coverage" \) ! -path "*/node_modules/*" -print0 | xargs -0 rm -rf
55
rm -rf node_modules/.cache
66

77
echo "Build files and cache deleted."

0 commit comments

Comments
 (0)