-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: switch to github actions (#826)
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
- Loading branch information
1 parent
007b0b7
commit 3af1b4b
Showing
6 changed files
with
127 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: validate | ||
on: | ||
push: | ||
branches: | ||
[ | ||
'+([0-9])?(.{+([0-9]),x}).x', | ||
'master', | ||
'next', | ||
'next-major', | ||
'beta', | ||
'alpha', | ||
'!all-contributors/**', | ||
] | ||
pull_request: | ||
branches-ignore: ['all-contributors/**'] | ||
jobs: | ||
main: | ||
continue-on-error: ${{ matrix.react != 'latest' }} | ||
strategy: | ||
matrix: | ||
node: [10.13, 12, 14, 15] | ||
react: [latest, next, experimental] | ||
runs-on: ubuntu-latest | ||
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 | ||
|
||
# as requested by the React team :) | ||
# https://reactjs.org/blog/2019/10/22/react-release-channels.html#using-the-next-channel-for-integration-testing | ||
- name: ⚛️ Setup react | ||
run: npm install react@${{matrix.react}} react-dom@${{matrix.react}} | ||
|
||
- 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: | ||
${{ github.repository == 'testing-library/react-testing-library' && | ||
contains('refs/heads/master,refs/heads/beta,refs/heads/next,refs/heads/alpha', | ||
github.ref) && 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: 17 | ||
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.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters