2019-08-27 09:09:27 +08:00
|
|
|
name: Node CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- staging
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2019-08-27 09:13:53 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [12.x]
|
|
|
|
|
2019-08-27 09:09:27 +08:00
|
|
|
steps:
|
2019-08-27 09:22:31 +08:00
|
|
|
- uses: actions/checkout@master
|
|
|
|
|
2019-08-27 09:15:17 +08:00
|
|
|
- name: Use Node.js ${{ matrix.node_version }}
|
2019-08-27 09:22:31 +08:00
|
|
|
uses: actions/setup-node@master
|
2019-08-27 09:09:27 +08:00
|
|
|
with:
|
2019-08-27 09:15:17 +08:00
|
|
|
node-version: ${{ matrix.node_version }}
|
2019-08-27 09:22:31 +08:00
|
|
|
|
2019-08-27 09:09:27 +08:00
|
|
|
- name: npm install, build, and test
|
|
|
|
run: |
|
|
|
|
npm install
|
|
|
|
npm run start -- --testMode
|
|
|
|
npm run demo
|
|
|
|
npm run coverage
|
2019-08-27 09:22:31 +08:00
|
|
|
|
|
|
|
- uses: codecov/codecov-action@v1.0.2
|
|
|
|
with:
|
|
|
|
token: ${{secrets.CODECOV_TOKEN}}
|
|
|
|
|
2019-08-27 09:09:27 +08:00
|
|
|
env:
|
|
|
|
CI: true
|