-
-
Notifications
You must be signed in to change notification settings - Fork 5
59 lines (48 loc) · 1.18 KB
/
test.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Test
# Trigger on push
on:
push:
branches:
- dev
jobs:
# build and run tests
build:
runs-on: ubuntu-latest
# setup node, build, run tests and publish if new release
steps:
- name: Checkout GitHub repository
uses: actions/checkout@v2
- name: Set up Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Install npm packages
working-directory: ./
run: npm ci
- name: Build project
working-directory: ./
run: npm run build
- name: Run Lint
working-directory: ./
run: npm run lint
test:
needs: build
runs-on: ubuntu-latest
steps:
- name: checkout Github repository
uses: actions/checkout@v2
- name: set up Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: npm install
working-directory: ./
run: npm ci
- name: npm test
run: npm test
working-directory: ./
- name: Create test coverage artifact
uses: actions/upload-artifact@v1
with:
name: coverage
path: ./coverage