2020-09-05 12:43:05 +00:00
|
|
|
name: Tester
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tester:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
2021-10-20 08:56:46 +00:00
|
|
|
node-version: ['12', '14', '16', '17']
|
2020-09-05 12:43:05 +00:00
|
|
|
fail-fast: false
|
|
|
|
steps:
|
2021-05-12 05:09:55 +00:00
|
|
|
- uses: actions/checkout@v2.3.4
|
2020-09-05 12:43:05 +00:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2021-10-16 09:29:53 +00:00
|
|
|
uses: actions/setup-node@v2.4.1
|
2020-09-05 12:43:05 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Cache NPM dependencies
|
2021-05-28 05:22:05 +00:00
|
|
|
uses: actions/cache@v2.1.6
|
2020-09-05 12:43:05 +00:00
|
|
|
with:
|
|
|
|
path: node_modules
|
|
|
|
key: ${{ runner.os }}-npm-cache
|
|
|
|
restore-keys: ${{ runner.os }}-npm-cache
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: npm install
|
|
|
|
- name: Test
|
|
|
|
run: npm run test
|
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
coverage:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest]
|
2021-04-25 08:47:04 +00:00
|
|
|
node-version: ['14.x']
|
2020-09-05 12:43:05 +00:00
|
|
|
steps:
|
2021-05-12 05:09:55 +00:00
|
|
|
- uses: actions/checkout@v2.3.4
|
2020-09-05 12:43:05 +00:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2021-10-16 09:29:53 +00:00
|
|
|
uses: actions/setup-node@v2.4.1
|
2020-09-05 12:43:05 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Cache NPM dependencies
|
2021-05-28 05:22:05 +00:00
|
|
|
uses: actions/cache@v2.1.6
|
2020-09-05 12:43:05 +00:00
|
|
|
with:
|
|
|
|
path: node_modules
|
|
|
|
key: ${{ runner.os }}-npm-cache
|
|
|
|
restore-keys: ${{ runner.os }}-npm-cache
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: npm install
|
|
|
|
- name: Coverage
|
|
|
|
run: npm run test
|
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
- name: Upload coverage report to Codecov
|
2021-09-13 15:02:16 +00:00
|
|
|
uses: codecov/codecov-action@v2.1.0
|
2020-09-05 12:43:05 +00:00
|
|
|
with:
|
|
|
|
fail_ci_if_error: true
|