nemo-shen ee0e485eef
test(Button): add unit test (#4603)
* fix: test init

* test(Button): add unit test

* fix(test): remove unused code

* test(build): remove demo/test dir when compile

* fix(Button): remove duplicate demo

* test(Button): adjust component.json
2021-11-10 15:54:37 +08:00

52 lines
992 B
YAML

name: CI
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Run linter
run: npm run lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Run test cases
run: npm test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Build
run: npm run build:lib