-
Notifications
You must be signed in to change notification settings - Fork 470
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
chore: switch to github actions #809
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit c926105:
|
Codecov Report
@@ Coverage Diff @@
## master #809 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 26 26
Lines 719 911 +192
Branches 184 277 +93
==========================================
+ Hits 719 911 +192
Continue to review full report at Codecov.
|
main: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] |
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 need windows here? May be worth trying but might drain free minutes since it doubles the number of runs.
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.
Unless I'm reading this incorrectly, there is no limit to how much time the jobs run in total, only in how long an individual job runs: https://docs.github.com/en/free-pro-team@latest/actions/reference/usage-limits-billing-and-administration
There's also a limit on concurrency, but that's probably not a concern either I think.
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.
There's also a limit on concurrency, but that's probably not a concern either I think.
There are only 20 per account. dom-testing-library alone now uses 8 instead of 4. I'm missing some context why we need to introduce the windows run.
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 guess I figured it was easy and "free," but I guess we can drop windows 👍
main: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] |
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.
Unless I'm reading this incorrectly, there is no limit to how much time the jobs run in total, only in how long an individual job runs: https://docs.github.com/en/free-pro-team@latest/actions/reference/usage-limits-billing-and-administration
There's also a limit on concurrency, but that's probably not a concern either I think.
.github/workflows/validate.yml
Outdated
needs: main | ||
runs-on: ubuntu-latest | ||
if: | ||
${{ contains('master,beta,next,alpha', github.base_ref) && |
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.
This doesn't appear to work. This job should not run on this PR but it is... I'm not sure how else to skip this job for non-release branches 🤔
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.
Not 100%, but the docs say github.base_ref
is only present on pull_request
events. So it might be treating it like an empty string and it is matching the contains
function. Just a possible guess to try something like ${{ github.base_ref != '' && contains(...
or ${{ contains(..., github.base_ref || 'not-found')
.
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 yeah! I think I need to use ref
👍 Thanks!
Alright! I think we're ready to make this happen! Now I just need to apply this same change to LITERALLY EVERY REPO I MAINTAIN 😱 Sure wish it were easier to share these action configs 🙄 |
That's odd that unlike gitlab-ci, there's no extend/include flow in github actions (at least I didn't find this in the documentation). Need some help with applying the change in other repos? |
Just found this https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/sharing-workflows-with-your-organization, not sure if it helps? |
@MatanBobi, thanks for the offer! Feel free to make PRs. I'm thinking about making a custom action that does everything so it's easier to keep up-to-date. @afontcu, thanks. Unfortunately that's just a way to make a template which is only marginally helpful. I want to be able to keep things up-to-date without having to update every repo. |
@kentcdodds would you like me to wait for the custom action or can I start adding this workflow in our other repos? :) |
I don't think custom actions will work very well, so you can go ahead. One thing I haven't figured out yet is how to properly ignore all-acontributers branches for pull requests. Other than that, generator-kcd-oss's validate job is pretty good 👍 |
🎉 This PR is included in version 7.26.6 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Because Travis gave OSS the shaft... https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing
This works: https://github.com/kentcdodds/generator-kcd-oss/releases/tag/v4.9.0
We've got the NPM_TOKEN set at the org-level so we're solid 👍
We won't actually know if the release works until we have a release, but 🤷♂️