File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 runs-on : ubuntu-latest
3030 permissions :
3131 contents : read
32+ pull-requests : read
3233 steps :
3334 - name : Checkout code
3435 uses : actions/checkout@v5
@@ -89,28 +90,20 @@ jobs:
8990
9091 const summaryPath = 'coverage/coverage-summary.json';
9192 const summary = JSON.parse(fs.readFileSync(summaryPath, 'utf8')).total;
92- const thresholds = {
93- lines: 94,
94- functions: 94,
95- statements: 94,
96- branches: 90,
97- };
9893 const metrics = ['lines', 'functions', 'statements', 'branches'];
9994 const rows = metrics.map((metric) => {
10095 const value = summary[metric]?.pct ?? 0;
101- const threshold = thresholds[metric];
102- const status = value >= threshold ? 'PASS' : 'FAIL';
103- return `| ${metric} | ${value.toFixed(2)}% | ${threshold}% | ${status} |`;
96+ return `| ${metric} | ${value.toFixed(2)}% |`;
10497 });
10598
10699 const markdown = [
107100 '## Coverage Summary',
108101 '',
109- '| Metric | Coverage | Threshold | Status | ',
110- '| --- | ---: | ---: | :---: | ',
102+ '| Metric | Coverage |',
103+ '| --- | ---: |',
111104 ...rows,
112105 '',
113- 'Full HTML coverage report is attached as a workflow artifact .',
106+ 'Coverage thresholds are enforced by the test runner configuration .',
114107 '',
115108 ].join('\n');
116109
You can’t perform that action at this time.
0 commit comments