2019-11-19 23:11:01 +08:00
|
|
|
name: unit-tests
|
2020-01-12 08:13:04 +08:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
- releases/v3
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- dev
|
2020-02-22 22:23:41 +08:00
|
|
|
tags-ignore:
|
|
|
|
- '*.*'
|
2019-11-19 23:06:27 +08:00
|
|
|
jobs:
|
2020-01-12 08:13:04 +08:00
|
|
|
unit-tests:
|
2019-11-19 23:06:27 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-01-12 08:13:04 +08:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
2019-11-19 23:06:27 +08:00
|
|
|
|
2020-11-18 00:57:42 +08:00
|
|
|
- uses: actions/setup-node@v1.4.4
|
2020-05-17 06:26:05 +08:00
|
|
|
with:
|
|
|
|
node-version: '10.15.1'
|
|
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
|
2020-05-17 06:19:08 +08:00
|
|
|
- name: Install Yarn
|
|
|
|
run: npm install -g yarn
|
|
|
|
|
2020-01-12 08:13:04 +08:00
|
|
|
- name: Install and Test
|
|
|
|
run: |
|
2020-05-17 06:19:08 +08:00
|
|
|
yarn install
|
|
|
|
yarn lint
|
|
|
|
yarn test
|
2020-01-20 02:48:11 +08:00
|
|
|
|
|
|
|
- name: Uploade CodeCov Report
|
|
|
|
uses: codecov/codecov-action@v1
|
|
|
|
with:
|
2020-02-22 22:36:41 +08:00
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|