-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: run tests on push, upload coverage report to codecov
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 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,27 @@ | ||
name: test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@01aecccf739ca6ff86c0539fbc67a7a5007bbc81 | ||
- name: Setup Node | ||
uses: actions/setup-node@44c9c187283081e4e88b54b0efad9e9d468165a4 | ||
with: | ||
node-version: '12.x' | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- name: Cache dependencies | ||
uses: actions/cache@70655ec8323daeeaa7ef06d7c56e1b9191396cbe | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- run: yarn install | ||
- run: yarn test --bail --ci | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@e34ee485244a5b5e6e4e1b96daa4a15c9073e4fc |