2021-07-12 15:34:50 +00:00
|
|
|
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:
|
2021-07-12 15:52:40 +00:00
|
|
|
fail-fast: false
|
2021-07-12 15:34:50 +00:00
|
|
|
matrix:
|
2021-07-12 15:52:40 +00:00
|
|
|
include:
|
|
|
|
- node: 12
|
|
|
|
icu: node_modules/full-icu
|
|
|
|
- node: 14
|
|
|
|
- node: 16
|
2021-07-12 15:34:50 +00:00
|
|
|
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-
|
2021-07-12 15:52:40 +00:00
|
|
|
- name: Use Node.js ${{ matrix.node }}
|
2021-07-12 15:34:50 +00:00
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
- run: npm ci --prefer-offline
|
2021-07-12 15:52:40 +00:00
|
|
|
- run: npm i --no-save full-icu
|
|
|
|
if: matrix.node == 12
|
2021-07-12 15:34:50 +00:00
|
|
|
- run: npm run coverage
|
2021-07-12 15:52:40 +00:00
|
|
|
env:
|
|
|
|
NODE_ICU_DATA: ${{ matrix.icu }}
|
2021-07-12 15:34:50 +00:00
|
|
|
- name: Codecov
|
2021-07-12 15:37:47 +00:00
|
|
|
if: always() && matrix.node == 14
|
2021-07-12 15:34:50 +00:00
|
|
|
uses: codecov/codecov-action@v1.0.6
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|