This actions is not reporting good coverage for me
Closed this issue · 2 comments
After multiple attempts, this action had push a comment on my PR:
Here is my github action yml configuration extract :
# https://github.com/Tintef/nyc-reporter-action
- name: NYC Coverage Report
uses: Tintef/nyc-reporter-action@0.1.0
with:
GITHUB_TOKEN: ${{ secrets.NYC_COVERAGE_TOKEN }}
REPORTER: 'text' # defaults to 'text-summary'
Please notice that your readme sample doesn't include version (and uppercase for first letter?) and dont work without (at least version)
Locally on my private project, if run coverage then the following
$ npx nyc report -t ./coverage/
----------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------|---------|----------|---------|---------|-------------------
All files | 0 | 0 | 0 | 0 |
----------|---------|----------|---------|---------|-------------------
If I'm doing the same without -t
option, then I got the report
$ npx nyc report
---------------------------|---------|----------|---------|---------|-------------------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------|---------|----------|---------|---------|-------------------------------
All files | 64.72 | 54.86 | 62.78 | 65.23 |
(...)
- is
-t
option mandatory ? - could you make an option to avoid adding
-t
?
Thanks
NB/ I just switch onto romeovs/lcov-reporter-action@v0.2.16
which work but doesn't remove previous report too
- Uppercase is not needed on
tintef/nyc-reporter-action
. - The version is indeed needed, but I didn't add it to avoid having to update the README on each iteration. It could be a good addition to specify the user to add it tho.
- I'm not using the
-t
option on any of the (private) projects where I set this action up, so I'm not sure why you need to add it.
If you look closely at what the -t
options does you can see why you need it for the action to run
--temp-dir, -t directory to output raw coverage information to
[string] [default: "./.nyc_output"]
I was going to report an issue for the missing version but since it's mentioned here I will just kindly remind you to update the readme and hint to users to just use the latest version