-
-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (41 loc) · 1.21 KB
/
ci.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
name: Test branch
on: push
jobs:
ci:
name: Run Build and check output is checked-in
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@61b9e3751b92087fd0b06925ba6dd6314e06f089 # master
- name: Use Node.js
uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
with:
node-version: 10.x
- name: 'Build'
run: |
npm install
npm run build
- name: Check no files have changes
run: git diff --exit-code
unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@61b9e3751b92087fd0b06925ba6dd6314e06f089 # master
- name: Use Node.js
uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
with:
node-version: 10.x
- name: Install NPM Packages
run: |
npm install
- name: Run Unit Tests
run: |
npm run test -- --coverage
- name: Check Linting
run: |
npm run lint
- name: Submit to CodeCov
uses: codecov/codecov-action@29386c70ef20e286228c72b668a06fd0e8399192 # v1
with:
file: ./coverage/lcov.info
fail_ci_if_error: true