-
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: validate | ||
on: [push, pull_request] | ||
jobs: | ||
main: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
node: [10.14.2, 12, 14, 15] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: 📥 Download deps | ||
uses: bahmutov/npm-install@v1 | ||
with: | ||
useLockFile: false | ||
|
||
- name: ▶️ Run validate script | ||
run: npm run validate | ||
|
||
- name: ⬆️ Upload coverage report | ||
uses: codecov/codecov-action@v1 | ||
|
||
release: | ||
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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Not 100%, but the docs say There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh yeah! I think I need to use |
||
github.event_name == 'push' }} | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
|
||
- name: 📥 Download deps | ||
uses: bahmutov/npm-install@v1 | ||
with: | ||
useLockFile: false | ||
|
||
- name: 🏗 Run build script | ||
run: npm run build | ||
|
||
- name: 🚀 Release | ||
uses: cycjimmy/semantic-release-action@v2 | ||
with: | ||
semantic_version: 16 | ||
branches: | | ||
[ | ||
'+([0-9])?(.{+([0-9]),x}).x', | ||
'master', | ||
'next', | ||
'next-major', | ||
{name: 'beta', prerelease: true}, | ||
{name: 'alpha', prerelease: true} | ||
] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file was deleted.
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 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 👍