-
Notifications
You must be signed in to change notification settings - Fork 20
41 lines (38 loc) · 1.17 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: CI
on: [pull_request]
concurrency:
group: ci_${{ github.head_ref }}
cancel-in-progress: true
jobs:
library:
name: Library Build & Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache Node Modules
id: cache-node-modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ./node_modules
key: library-npm-${{ hashFiles('package-lock.json') }}
- name: Read .nvmrc
run: echo NVMRC=`cat .nvmrc` >> $GITHUB_ENV
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.NVMRC }}
- name: Install npm Packages
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
- name: Run Production Build
run: npm run build_lib
- name: Run Tests
run: npm run test_lib:ci
- name: Run Tests & Upload Coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: ${{github.workspace}}/projects/coverage/lcov.info:lcov