-
-
Notifications
You must be signed in to change notification settings - Fork 74
45 lines (39 loc) · 1016 Bytes
/
tests.yml
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
45
name: Run tests and build
on:
push:
pull_request:
branches:
- "master"
jobs:
tests:
runs-on: ubuntu-latest
steps:
# Checkout the latest code from the repo
- name: Checkout repo
uses: actions/checkout@v2
# Build the app using nodejs
- name: Use node js 15
uses: actions/setup-node@v2
with:
node-version: '15'
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
test-build:
# It is important to make sure the dependency upgrades
# don't break the builds.
runs-on: ubuntu-latest
steps:
# Checkout the latest code from the repo
- name: Checkout repo
uses: actions/checkout@v2
# Build the app using nodejs
- name: Use node js 15
uses: actions/setup-node@v2
with:
node-version: '15'
- name: Install dependencies
run: npm install
- name: Build for production
run: npm run build