2020-05-27 09:43:28 -04:00
|
|
|
name: lint and build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-07-16 05:22:53 -04:00
|
|
|
branches: [master]
|
2020-05-27 09:43:28 -04:00
|
|
|
pull_request:
|
2020-07-16 05:22:53 -04:00
|
|
|
branches: [master]
|
2020-05-27 09:43:28 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2020-06-06 18:02:50 -04:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node: ['10', '12', '14']
|
|
|
|
name: Test with NodeJS ${{ matrix.node }}
|
2020-05-27 09:43:28 -04:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Cache node_modules
|
|
|
|
uses: actions/cache@v1.1.0
|
|
|
|
with:
|
|
|
|
path: node_modules
|
|
|
|
key: node_modules
|
2020-06-06 18:02:50 -04:00
|
|
|
- name: Set up NodeJS
|
|
|
|
uses: actions/setup-node@v1
|
2020-05-27 09:43:28 -04:00
|
|
|
with:
|
2020-06-06 18:02:50 -04:00
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn install
|
2020-07-18 16:17:36 -04:00
|
|
|
- name: Test Project
|
2020-07-16 05:34:56 -04:00
|
|
|
run: yarn test
|
2020-06-06 18:02:50 -04:00
|
|
|
- name: Build project
|
|
|
|
run: yarn build
|