forked from gdg-x/hoverboard
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1014 Bytes
/
pre-merge.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Pre Merge Checks
on:
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [12, 14]
name: Build & Test on Node ${{ matrix.node-version }}
steps:
- name: Checkout the repo
uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Building the development environment
run: npm run build
env:
NODE_ENV: development
- name: Building the production environment
run: npm run build
- name: Running the tests
run: npm run test