Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add validate workflow instead of travis (#311)
* ci: add validate workflow based on yo kcd-oss * chore: remove travis file * chore: force enabling colors for validate script * chore: use master branch * chore: update Code of Conduct email address Co-authored-by: Nick McCurdy <nick@nickmccurdy.com>
- Loading branch information
1 parent
8298015
commit 2927c95
Showing
6 changed files
with
214 additions
and
94 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,82 @@ | ||
name: validate | ||
on: | ||
push: | ||
branches: | ||
- '+([0-9])?(.{+([0-9]),x}).x' | ||
- 'master' | ||
- 'next' | ||
- 'next-major' | ||
- 'beta' | ||
- 'alpha' | ||
- '!all-contributors/**' | ||
pull_request: {} | ||
jobs: | ||
main: | ||
# ignore all-contributors PRs | ||
if: ${{ !contains(github.head_ref, 'all-contributors') }} | ||
strategy: | ||
matrix: | ||
node: [10.14, 12, 14, 15] | ||
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 | ||
|
||
- name: ▶️ Run validate script | ||
run: npm run validate | ||
env: | ||
FORCE_COLOR: true | ||
|
||
- name: ⬆️ Upload coverage report | ||
uses: codecov/codecov-action@v1 | ||
|
||
release: | ||
needs: main | ||
runs-on: ubuntu-latest | ||
if: | ||
${{ github.repository == 'testing-library/jest-dom' && | ||
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
Oops, something went wrong.