Open grant opened 1 year ago
It looks like this action assumes that the jest config is a json
file (ours is not), and so it improperly gets the coverage threshold config value.
Hi @ArtiomTr , do you know the answer to this?
Would you say that this default config is a bug? It would be nice if the default 0 so action comment aren't all red π΄ symbolizing an error when there is none.
Hello @grant :wave:,
Sorry for the late response. That is a quite complicated problem, although it seems simple at first glance. There are several issues, that occurred due to bad action architecture.
coverageThreshold
field in jest.config.js
name: 'coverage'
on:
pull_request:
branches:
- master
- main
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# β branch name here
- uses: ArtiomTr/jest-coverage-report-action@without-bulbs
Let me know if this solution will fit your needs.
Thanks. I don't think we're going to use this Action for our use-case. For this issue, was just looking for an option to disable the column or use our config.
Facing similar issue. Would be nice to be able to disable bulbs as long as they show misleading information
@ArtiomTr thank you for the detailed explanation of this problem
@ArtiomTr Any updates on the above issue?
@ArtiomTr I'd actually be grateful if you could make a separate repo without the bulbs. Is that offer still on the table?
Describe a bug
I'm using this action with a repo setup that doesn't have a coverage threshold. For reference, our coverage is around 10-20%.
We're seeing
St.β π΄
for the status result. This is making engineers think something is wrong with PRs.Questions:
coverageThreshold
? I wouldn't expect this action tell me if my code is above or below a threshold if I have not defined one in my config.St. ?
.I think the code is here:
https://github.com/ArtiomTr/jest-coverage-report-action/blob/952a05968ad9e0b4ab2ab221a8d7d72e621aec51/src/format/summary/formatCoverageSummary.ts#L23
Which defines a default threshold to
60
?https://github.com/ArtiomTr/jest-coverage-report-action/blob/952a05968ad9e0b4ab2ab221a8d7d72e621aec51/src/utils/getStatusOfPercents.ts#L5
I would argue that
60
is not visible to the end user and shouldn't be set. Only the user or jest should be able to set a default config.Expected behavior
Actual behavior
Alternatives Considered
We will probably just make our threshold 0 to ensure PRs are π’ ok.