Skip to content

Commit b6cdc9d

Browse files
authored
Merge branch 'master' into dependabot/add-v2-config-file
2 parents 433b82b + 676fd78 commit b6cdc9d

File tree

4 files changed

+129
-81
lines changed

4 files changed

+129
-81
lines changed

.github/workflows/build.yml

+43-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: Build process
2-
on: [push, pull_request]
1+
name: Build, test and coverage
2+
on: pull_request
33

44
jobs:
5-
test:
6-
name: Build and test
7-
runs-on: ubuntu-latest
5+
test-matrix:
86
strategy:
97
matrix:
10-
node: [8, 10, 12]
8+
node: [10, 12, 14]
9+
name: Test build Node v ${{ matrix.node }}
10+
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v1
@@ -18,17 +18,51 @@ jobs:
1818
node-version: ${{ matrix.node }}
1919

2020
- name: Cache node modules
21+
id: cache-node-modules
2122
uses: actions/cache@v1
2223
with:
23-
path: node_modules
24-
key: build-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
25-
restore-keys: build-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
24+
path: ./node_modules
25+
key: test-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
26+
restore-keys: test-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
2627

2728
- name: Install deps
29+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
2830
run: npm install
2931

3032
- name: Lint code
3133
run: make lint
3234

3335
- name: Run tests
3436
run: make tests
37+
38+
test-success:
39+
runs-on: ubuntu-latest
40+
needs: test-matrix
41+
steps:
42+
- name: Matrix tests passed
43+
run: echo Done!
44+
45+
test-coverage:
46+
runs-on: ubuntu-latest
47+
needs: test-success
48+
steps:
49+
- uses: actions/checkout@v2
50+
- uses: actions/setup-node@v1
51+
with:
52+
node-version: 12
53+
- uses: actions/cache@v1
54+
id: cache-node-modules
55+
with:
56+
path: ./node_modules
57+
key: test-12-${{hashFiles('./package-lock.json')}}
58+
restore-keys: test-12-${{hashFiles('./package-lock.json')}}
59+
- name: Install modules
60+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
61+
run: npm install
62+
- name: Test with coverage
63+
run: make test-coverage
64+
- name: Coveralls
65+
uses: coverallsapp/github-action@master
66+
with:
67+
github-token: ${{ secrets.GITHUB_TOKEN }}
68+

.github/workflows/coverage.yml

-40
This file was deleted.

package-lock.json

+85-31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"fs-extra": "^8.1.0",
6666
"inquirer": "^7.0.0",
6767
"lodash": "^4.17.15",
68-
"serialport": "^8.0.5",
68+
"serialport": "^9.0.0",
6969
"tmp": "^0.1.0"
7070
},
7171
"devDependencies": {

0 commit comments

Comments
 (0)