Skip to content

Commit 01bd23e

Browse files
committed
chore: 🔧 filter coverage inclusions to a sensible state
1 parent 923baaf commit 01bd23e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/action.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ async function run(): Promise<void> {
123123
// Read coverage file
124124
const coverageFilePath = path.resolve(coverageFile);
125125
if (!fs.existsSync(coverageFilePath)) {
126-
core.setFailed(`Coverage file not found: ${coverageFilePath}`);
126+
core.setFailed(
127+
`coverage-summary.json file not found at path ${coverageFilePath}. Did you forget to add the reporter in your vitest.config.js?`
128+
);
127129
return;
128130
}
129131

vitest.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ export default defineConfig({
77
provider: "v8",
88
reporter: ["text", "json"],
99
reportsDirectory: "./coverage",
10+
clean: true,
11+
include: ["test-src/**/*", "src/v8.json.summary.reporter.ts"],
12+
exclude: [
13+
"src/action.ts",
14+
"action.ts",
15+
"**/*.d.ts",
16+
"dist/**",
17+
"node_modules/**",
18+
],
1019
},
1120
reporters: ["default", new V8JSONSummaryReporter()],
1221
},

0 commit comments

Comments
 (0)