OpenBeta / sandbag

JS utilities for working with climbing grades
MIT License
24 stars 17 forks source link

Add test coverage report to README.md and Github actions #152

Closed marinojoey closed 1 year ago

marinojoey commented 1 year ago

I moved my work from my fork's develop branch into a feature branch and when I force-pushed it closed my old PR automatically (I've gotten used to BitBucket).

musoke commented 1 year ago

Yeah I don't understand the exact criteria, but GitHub closes PRs when the branch gets deleted or all the changes get removed.

Thanks for looking into this!

musoke commented 1 year ago

Would we fail commits if coverage decreases? I find that coverage is too fragile for automatic failures

On Sun, Aug 27, 2023, 18:36 Viet Nguyen @.***> wrote:

@.**** commented on this pull request.

In README.md https://github.com/OpenBeta/sandbag/pull/152#discussion_r1306765537:

@@ -137,6 +137,22 @@ yarn install yarn test

+#### Generating Test Coverage Report + +To generate a test coverage report using Jest, follow these steps:

Do you think contributors would run it if it's optional? What if we add it to the pre-commit hook?

https://github.com/OpenBeta/sandbag/blob/develop/.husky/pre-commit

— Reply to this email directly, view it on GitHub https://github.com/OpenBeta/sandbag/pull/152#pullrequestreview-1597244343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7ET7GP2CWU34Z43CQYYSLXXPRXVANCNFSM6AAAAAA4ATEWPQ . You are receiving this because you commented.Message ID: @.***>

vnugent commented 1 year ago

Would we fail commits if coverage decreases? I find that coverage is too fragile for automatic failures

what about setting a very low threshold to start? https://jestjs.io/docs/configuration#coveragethreshold-object

marinojoey commented 1 year ago

coverage threshold has been added, and it is very low.

Currently my commits are fairly atomic. Let me know if we'd prefer to squash them, not sure what is preferred.

vnugent commented 1 year ago

@all-contributors add @marinojoey for code and ideas

allcontributors[bot] commented 1 year ago

@vnugent

I've put up a pull request to add @marinojoey! :tada:

vnugent commented 1 year ago

Currently my commits are fairly atomic. Let me know if we'd prefer to squash them, not sure what is preferred.

For future reference you can publish multiple commits to an open PR. When a project maintainer is ready to accept the PR, they will squash all the commits.