-
-
Notifications
You must be signed in to change notification settings - Fork 9
add codecov to unit test workflow #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #1 +/- ##
=====================================
Coverage ? 8.45%
=====================================
Files ? 45
Lines ? 5382
Branches ? 0
=====================================
Hits ? 455
Misses ? 4927
Partials ? 0 Continue to review full report at Codecov.
|
1a3ec07
to
41cdae3
Compare
Invoking |
0588ac6
to
7cf0f2b
Compare
Whoops. Left comments in there. One more time. |
7cf0f2b
to
f20a2ac
Compare
@@ -4,6 +4,8 @@ name: Run Unit Tests | |||
on: | |||
pull_request: | |||
push: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to run on push at all if we run on PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You would know better than I, but I thought we had to do this to make it run directly on dev after a merge. Outside metrics and tools that reference the repo's CI status should probably reference the dev branch, so something needs to trigger it.
Ex: if something other than Actions does CD, or the README badges for that matter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that is how to make that happen, though on pull_request
will test any commits to a PR which theoretically handles all of those except a commit directly to dev
, which should probably be forbidden in branch protection rules?
Maybe unit tests on PR and coverage on push? This would prevent checking coverage on every commit and prevent duplicating tests when you open PR and then merge the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it should now be running only on "push" (merge) to dev
:
name: Run Unit Tests
on:
pull_request:
push:
branches:
- dev
So only once per push for PR branches. If I've set it up the way I think, this will run every time you breathe on a PR, and whenever you merge a PR into dev, but it won't fire on non-PR branches.
I dunno about the coverage thing. I agree that every time you git push
could be excessive, but I wanna see it before a merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is correct, just means that opening a PR and merging that PR will call the same workflow which is definitely excessive, though we probably aren't too concerned about hitting action limits right now..
Note that a 'push' could be a force push or a commit; I don't think this should happen on the dev branch, but not sure if those branch protection rules are there. Also note that a draft PR is a PR, so if you always open a PR when you start a branch (I do), you will run actions on every commit (good for unit tests IMO, not sure for coverage).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to reference status on dev
without running the suite on dev
? It's mainly the unit and build runs whose status I'd like to monitor. Bragging about coverage is just a nice plus 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.. well, GH Actions are tied to commit ID's, so the run needs to be on whatever the latest commit on dev
is..
No description provided.