2019-09-26 09:25:26 -04:00
|
|
|
name: JS Tests
|
2020-10-29 13:26:15 -04:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches-ignore:
|
|
|
|
- "dependabot/**"
|
|
|
|
pull_request:
|
|
|
|
|
2019-10-08 01:47:40 -04:00
|
|
|
env:
|
|
|
|
CI: true
|
2019-08-08 12:40:26 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
run:
|
|
|
|
name: Node ${{ matrix.node }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
2019-08-23 19:32:29 -04:00
|
|
|
fail-fast: false
|
2019-08-08 12:40:26 -04:00
|
|
|
matrix:
|
2020-10-29 13:38:31 -04:00
|
|
|
node: [10, 12, 14]
|
2019-08-08 12:40:26 -04:00
|
|
|
|
|
|
|
steps:
|
2019-08-23 19:32:29 -04:00
|
|
|
- name: Clone repository
|
2019-12-13 08:59:37 -05:00
|
|
|
uses: actions/checkout@v2
|
2019-08-09 11:28:41 -04:00
|
|
|
|
2020-10-29 13:26:15 -04:00
|
|
|
- name: Set up Node.js
|
2019-09-16 08:28:25 -04:00
|
|
|
uses: actions/setup-node@v1
|
2019-08-09 11:28:41 -04:00
|
|
|
with:
|
2019-09-16 08:28:25 -04:00
|
|
|
node-version: ${{ matrix.node }}
|
2019-08-09 11:28:41 -04:00
|
|
|
|
2019-12-13 10:12:03 -05:00
|
|
|
- name: Set up npm cache
|
2020-05-28 13:28:02 -04:00
|
|
|
uses: actions/cache@v2
|
2019-12-13 10:12:03 -05:00
|
|
|
with:
|
|
|
|
path: ~/.npm
|
2020-05-28 13:28:02 -04:00
|
|
|
key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
|
2019-12-13 10:12:03 -05:00
|
|
|
restore-keys: |
|
2020-05-28 13:28:02 -04:00
|
|
|
${{ runner.OS }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
2019-12-24 11:12:13 -05:00
|
|
|
${{ runner.OS }}-node-v${{ matrix.node }}-
|
2019-12-13 10:12:03 -05:00
|
|
|
|
2019-08-09 11:28:41 -04:00
|
|
|
- name: Install npm dependencies
|
|
|
|
run: npm ci
|
|
|
|
|
2019-09-26 09:25:26 -04:00
|
|
|
- name: Run dist
|
|
|
|
run: npm run js
|
2019-08-09 11:28:41 -04:00
|
|
|
|
2019-09-26 09:25:26 -04:00
|
|
|
- name: Run JS tests
|
|
|
|
run: npm run js-test
|
2019-08-09 11:28:41 -04:00
|
|
|
|
|
|
|
- name: Run Coveralls
|
2019-11-18 14:03:43 -05:00
|
|
|
uses: coverallsapp/github-action@master
|
2020-10-29 13:38:31 -04:00
|
|
|
if: matrix.node == 14
|
2019-11-18 14:03:43 -05:00
|
|
|
with:
|
|
|
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
path-to-lcov: "./js/coverage/lcov.info"
|