2020-12-15 14:54:58 +08:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-12-15 14:57:35 +08:00
|
|
|
branches: [ master ]
|
2020-12-15 14:54:58 +08:00
|
|
|
pull_request:
|
2020-12-15 14:57:35 +08:00
|
|
|
branches: [ master ]
|
2020-12-15 14:54:58 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [14.x]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: npm i
|
|
|
|
|
|
|
|
- name: Run linting
|
|
|
|
run: npm run lint
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: npm run coverage
|
|
|
|
|
|
|
|
- name: Upload coverage to Codecov
|
|
|
|
uses: codecov/codecov-action@v1
|