2020-08-31 06:48:58 -04:00
|
|
|
name: test, build
|
2020-05-27 09:43:28 -04:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-08-15 10:17:06 -04:00
|
|
|
branches: [main]
|
2020-05-27 09:43:28 -04:00
|
|
|
pull_request:
|
2020-08-15 10:17:06 -04:00
|
|
|
branches: [main]
|
2020-05-27 09:43:28 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2020-06-06 18:02:50 -04:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-08-27 08:34:10 -04:00
|
|
|
node: ['12', '14']
|
2020-08-31 06:48:58 -04:00
|
|
|
name: Test and build with NodeJS ${{ matrix.node }}
|
2020-05-27 09:43:28 -04:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Cache node_modules
|
2020-11-06 19:36:26 -05:00
|
|
|
uses: actions/cache@v2.1.3
|
2020-05-27 09:43:28 -04:00
|
|
|
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
|