Skip to content

Commit fddcb12

Browse files
committed
tmp
1 parent 0e75b5e commit fddcb12

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ inputs:
3434
description: 'Additional string that will be concatenated to comment'
3535
default: null
3636

37+
codeCoverageDirectory:
38+
description: 'code coverage summary location defaults to coverage-summary.json'
39+
default: coverage-summary.json
3740
branding:
3841
color: red
3942
icon: git-pull-request

src/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ async function run(): Promise<void> {
1717
const fullCoverage = JSON.parse(core.getInput('fullCoverageDiff'))
1818
const commandToRun = core.getInput('runCommand')
1919
const additionalCommentInfo = core.getInput('additionalCommentInfo')
20+
const codeCoverageDirectory = core.getInput('codeCoverageDirectory')
2021

2122
const delta = Number(core.getInput('delta'))
2223
const rawTotalDelta = core.getInput('total_delta')
@@ -40,7 +41,7 @@ async function run(): Promise<void> {
4041
execSync(`${commandToRun}`)
4142

4243
const codeCoverageNew = <CoverageReport>(
43-
JSON.parse(fs.readFileSync('coverage-summary.json').toString())
44+
JSON.parse(fs.readFileSync(codeCoverageDirectory).toString())
4445
)
4546

4647
const codeCoverageOld = <CoverageReport>(

0 commit comments

Comments
 (0)