2020-08-31 10:48:58 +00:00
|
|
|
name: test, build
|
2020-05-27 13:43:28 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-08-15 14:17:06 +00:00
|
|
|
branches: [main]
|
2020-05-27 13:43:28 +00:00
|
|
|
pull_request:
|
2020-08-15 14:17:06 +00:00
|
|
|
branches: [main]
|
2020-05-27 13:43:28 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2020-06-06 22:02:50 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-08-27 12:34:10 +00:00
|
|
|
node: ['12', '14']
|
2020-08-31 10:48:58 +00:00
|
|
|
name: Test and build with NodeJS ${{ matrix.node }}
|
2020-05-27 13:43:28 +00: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 22:02:50 +00:00
|
|
|
- name: Set up NodeJS
|
|
|
|
uses: actions/setup-node@v1
|
2020-05-27 13:43:28 +00:00
|
|
|
with:
|
2020-06-06 22:02:50 +00:00
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn install
|
2020-07-18 20:17:36 +00:00
|
|
|
- name: Test Project
|
2020-07-16 09:34:56 +00:00
|
|
|
run: yarn test
|
2020-06-06 22:02:50 +00:00
|
|
|
- name: Build project
|
|
|
|
run: yarn build
|