2019-09-15 12:36:17 +00:00
|
|
|
name: 'Lint And Test'
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- next
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
name: Lint Check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-07-16 23:24:50 +00:00
|
|
|
- uses: actions/checkout@v2
|
2019-09-15 12:36:17 +00:00
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
- name: Install Packages
|
|
|
|
run: npm install
|
|
|
|
- name: Lint Code
|
|
|
|
run: npm run lint:ci
|
|
|
|
|
|
|
|
run_tests:
|
|
|
|
name: Unit Tests
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
|
|
|
- windows-latest
|
|
|
|
node:
|
|
|
|
- 10.13.0
|
|
|
|
- 10.x
|
|
|
|
- 12.x
|
2020-07-16 23:24:50 +00:00
|
|
|
- 14.x
|
2019-09-15 12:36:17 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2020-07-16 23:24:50 +00:00
|
|
|
- uses: actions/checkout@v2
|
2019-09-15 12:36:17 +00:00
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
- name: Install Packages
|
|
|
|
run: npm install
|
|
|
|
- name: Run Tests
|
|
|
|
run: npm run test:ci
|
|
|
|
- name: Coveralls Parallel
|
2020-07-16 23:24:50 +00:00
|
|
|
uses: coverallsapp/github-action@v1.1.1
|
2019-09-15 12:36:17 +00:00
|
|
|
with:
|
2019-11-18 12:17:36 +00:00
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
2019-09-15 12:36:17 +00:00
|
|
|
parallel: true
|
|
|
|
- name: Coveralls Finished
|
2020-07-16 23:24:50 +00:00
|
|
|
uses: coverallsapp/github-action@v1.1.1
|
2019-09-15 12:36:17 +00:00
|
|
|
with:
|
2019-11-18 12:17:36 +00:00
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
2019-09-15 12:36:17 +00:00
|
|
|
parallel-finished: true
|