The comment file isn't being found - this is because the source path for the search defaults to the application directory you're building, not the action runner directory:
Error: Error: ENOENT: no such file or directory, open '/home/runner/work/JsFunctionAppTest/JsFunctionAppTest/comment-template.md'
Providing the full comment template path to the action results in it working:
- name: Report NYC coverage
uses: sidx1024/[email protected]
with:
coverage_file: "coverage/coverage-summary.json"
comment_template_file: "/home/runner/work/_actions/sidx1024/report-nyc-coverage-github-action/v1.2.6/comment-template.md"
The rest of the error:
Run sidx10[2](https://github.com/####/JsFunctionAppTest/runs/6453607763?check_suite_focus=true#step:9:2)4/[email protected]
with:
coverage_file: coverage/coverage-summary.json
comment_mode: new
base_coverage_file: .base_nyc_output/coverage-summary.json
comment_template_file: comment-template.md
github_token: ***
sources_base_path: /home/runner/work/JsFunctionAppTest/JsFunctionAppTest/
files_coverage_table_output_type_order: SBFL
Base coverage json was not readable.
/usr/bin/git diff --name-only --diff-filter=ACMRT origin/master...4758df2bbd[3](https://github.com/###/JsFunctionAppTest/runs/6453607763?check_suite_focus=true#step:9:3)0bc16c5a67a298d6caed260af9725
fatal: ambiguous argument 'origin/master...[4](https://github.com/###/JsFunctionAppTest/runs/6453607763?check_suite_focus=true#step:9:4)7[5](https://github.com/###/JsFunctionAppTest/runs/6453607763?check_suite_focus=true#step:9:5)8df2bbd30bc1[6](https://github.com/###/JsFunctionAppTest/runs/6453607763?check_suite_focus=true#step:9:6)c5a6[7](https://github.com/###/JsFunctionAppTest/runs/6453607763?check_suite_focus=true#step:9:7)a29[8](https://github.com/###/JsFunctionAppTest/runs/6453607763?check_suite_focus=true#step:9:8)d6caed260af[9](https://github.com/###/JsFunctionAppTest/runs/6453607763?check_suite_focus=true#step:9:9)725': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
A non-fatal error occurred while performing git diff: {
exitCode: 128,
stdout: '',
stderr: "fatal: ambiguous argument 'origin/master...4758df2bbd30bc16c5a67a298d6caed260af9725': unknown revision or path not in the working tree.\n" +
"Use '--' to separate paths from revisions, like this:\n" +
"'git <command> [<revision>...] -- [<file>...]'\n"
}
Error: Error: ENOENT: no such file or directory, open '/home/runner/work/JsFunctionAppTest/JsFunctionAppTest/comment-template.md'
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at run (/home/runner/work/_actions/sidx[10](https://github.com/###/JsFunctionAppTest/runs/6453607763?check_suite_focus=true#step:9:10)24/report-nyc-coverage-github-action/v1.2.6/dist/index.js:10[23](https://github.com/###/JsFunctionAppTest/runs/6453607763?check_suite_focus=true#step:9:23)1:32)