49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
name: QA
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-
|
|
- name: Use Node.js 14
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 14
|
|
- run: npm ci --prefer-offline
|
|
- run: npm run lint
|
|
- run: npm run typecheck
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node: [12, 14, 16]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.npm
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-
|
|
- name: Use Node.js 14
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
- run: npm ci --prefer-offline
|
|
- run: npm run coverage
|
|
- name: Codecov
|
|
if: always() && matrix.node == 14
|
|
uses: codecov/codecov-action@v1.0.6
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|