generated from iamogbz/node-js-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (43 loc) 路 1009 Bytes
/
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: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x]
steps:
- uses: actions/checkout@v1
- name: Setup
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: |
npm install
- name: Lint
run: |
npm run lint
- name: Test
env:
CI: true
run: |
npm test -- --ci --coverage
- name: Build
run: |
npm run build
- name: Integration
run: |
npm run e2e
- name: Deploy
if: matrix.node-version == '12.x' && github.ref == 'refs/heads/master'
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm run release
- name: Report
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "./artifacts/coverage/lcov.info"