Skip to content

Make it possible to skip package coverage #97

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

Merged
merged 4 commits into from
Feb 3, 2025
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
27 changes: 18 additions & 9 deletions __tests__/__snapshots__/functions.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ exports[`Dont Fail on negative difference if negative_difference_threshold is se
| utils.ts | 🟠 70.94% | 🟠 69% | 🔴 -1.94% |
| **Overall Coverage** | **🟢 50.51%** | **🟢 49%** | **🔴 -1.51%** |

_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`49%\`"
_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`49%\`
"
`;

exports[`Fail if negative_difference_threshold is set and exceeded 1`] = `
Expand Down Expand Up @@ -64,7 +65,8 @@ exports[`Fail if negative_difference_threshold is set and exceeded 2`] = `
| utils.ts | 🟠 70.94% | 🟠 69% | 🔴 -1.94% |
| **Overall Coverage** | **🟢 50.51%** | **🟢 49%** | **🔴 -1.51%** |

_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`49%\`"
_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`49%\`
"
`;

exports[`Fail if overall coverage is below fail threshold 1`] = `
Expand Down Expand Up @@ -98,7 +100,8 @@ exports[`Fail if overall coverage is below fail threshold 2`] = `
| utils.ts | 🟠 70.94% | 🟠 70.94% | ⚪ 0% |
| **Overall Coverage** | **🔴 50.51%** | **🔴 50.51%** | **⚪ 0%** |

_Minimum allowed coverage is_ \`99%\`_, this run produced_ \`50.51%\`"
_Minimum allowed coverage is_ \`99%\`_, this run produced_ \`50.51%\`
"
`;

exports[`Fail on negative difference 1`] = `
Expand Down Expand Up @@ -132,7 +135,8 @@ exports[`Fail on negative difference 2`] = `
| utils.ts | 🟠 70.94% | 🟠 69% | 🔴 -1.94% |
| **Overall Coverage** | **🟢 50.51%** | **🟢 49%** | **🔴 -1.51%** |

_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`49%\`"
_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`49%\`
"
`;

exports[`Generate Base Clover Markdown 1`] = `
Expand Down Expand Up @@ -165,7 +169,8 @@ exports[`Generate Base Clover Markdown 2`] = `
| utils.ts | 🟠 70.94% |
| **Overall Coverage** | **🟢 50.51%** |

_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`50.51%\`"
_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`50.51%\`
"
`;

exports[`Generate Base Cobertura Markdown 1`] = `
Expand Down Expand Up @@ -198,7 +203,8 @@ exports[`Generate Base Cobertura Markdown 2`] = `
| utils.ts | 🟠 67.36% |
| **Overall Coverage** | **🟢 49.83%** |

_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`49.83%\`"
_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`49.83%\`
"
`;

exports[`Generate Diffed Clover Markdown 1`] = `
Expand Down Expand Up @@ -231,7 +237,8 @@ exports[`Generate Diffed Clover Markdown 2`] = `
| utils.ts | 🟠 70.94% | 🟠 70.94% | ⚪ 0% |
| **Overall Coverage** | **🟢 50.51%** | **🟢 50.51%** | **⚪ 0%** |

_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`50.51%\`"
_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`50.51%\`
"
`;

exports[`Generate Diffed Cobertura Markdown 1`] = `
Expand Down Expand Up @@ -264,7 +271,8 @@ exports[`Generate Diffed Cobertura Markdown 2`] = `
| utils.ts | 🟠 67.36% | 🟠 67.36% | ⚪ 0% |
| **Overall Coverage** | **🟢 49.83%** | **🟢 49.83%** | **⚪ 0%** |

_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`49.83%\`"
_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`49.83%\`
"
`;

exports[`Only list changed files 1`] = `
Expand All @@ -290,5 +298,6 @@ exports[`Only list changed files 2`] = `
| utils.ts | 🟠 70.94% | 🟠 69% | 🔴 -1.94% |
| **Overall Coverage** | **🟢 50.51%** | **🟢 49%** | **🔴 -1.51%** |

_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`49%\`"
_Minimum allowed coverage is_ \`0%\`_, this run produced_ \`49%\`
"
`;
1 change: 1 addition & 0 deletions __tests__/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ test('getInputs', () => {
negativeDifferenceBy: 'package',
negativeDifferenceThreshold: -0,
retention: undefined,
skipPackageCoverage: false,
onlyListChangedFiles: false,
//This is a cheat
withBaseCoverageTemplate: f.withBaseCoverageTemplate,
Expand Down
93 changes: 49 additions & 44 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion dist/with-base-coverage.hbs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion dist/without-base-coverage.hbs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading