-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Update CI and (re)enable coverage #826
Conversation
.github/workflows/ci.yml
Outdated
@@ -0,0 +1,18 @@ | |||
name: ci | |||
on: [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.
on: [push] | |
on: [push, pull_request] |
It would be good to see that PRs are passing, I think this would make it work.
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.
Good point! 👍
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.. actually now I remember why I didn't add it. PR builds also run in the context of the source repo, but don't contain the secrets (e.g. NPM_TOKEN
), for obvious security reasons. Also we shouldn't release with every new PR build (yarn dv-scripts ci
).
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.
I addressed this by changing the conditional to:
if: github.event.repository.fork == false && github.event_name != 'pull_request'
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.
I think I have the rethink how dv-scripts
works a bit to simplify this 😆 . Good for now though!
Thanks, this looks great! |
a0808cb
to
a054f5d
Compare
a054f5d
to
af985d9
Compare
Codecov Report
@@ Coverage Diff @@
## main #826 +/- ##
=======================================
Coverage ? 96.29%
=======================================
Files ? 1
Lines ? 27
Branches ? 2
=======================================
Hits ? 26
Misses ? 1
Partials ? 0 Continue to review full report at Codecov.
|
🎉 This PR is included in version 8.5.9 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* upstream/main: release(version): Release 8.5.11 [skip ci] fix: null exception in FastImageViewManager.java (DylanVann#423) release(version): Release 8.5.10 [skip ci] chore: convert examples to hooks (DylanVann#830) release(version): Release 8.5.9 [skip ci] fix: FastImage extends ViewProps (DylanVann#829) ci: update CI and (re)enable coverage (DylanVann#826) [skip ci] release(version): Release 8.5.8 [skip ci] docs: fix gifs release(version): Release 8.5.7 [skip ci] chore: upgrade example to react-native@0.65.1 release(version): Release 8.5.6 [skip ci] fix: make corresponding flow file for .cjs file
A couple of commits here:
codecov-action
)yarn test --coverage
to generate and publish coverage dataAlso another important improvement: Prevent running
yarn dv-scripts ci
on forks. Obviously, the step will fail in forked repos, as the secrets are not available in that context and of course you wouldn't want to publish from forks anyway.Example of successful build/coverage report:
https://github.com/friederbluemle/react-native-fast-image/runs/3645227154
https://codecov.io/gh/friederbluemle/react-native-fast-image/tree/a0808cb138ed9e71fd40f1e21dee6dbec52042dd