-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (40 loc) · 1.05 KB
/
nodejs.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
name: Node CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# daily check at 01:00 AM
schedule:
- cron: '0 1 * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm run coverage
env:
CI: true
- name: upload coverage
uses: codecov/codecov-action@v1
with:
# remember add 'CODECOV_TOKEN' to your github secrets
token: ${{ secrets.CODECOV_TOKEN }}