Skip to content

Commit 4473b85

Browse files
authored
Merge pull request #275 from webpack/ci/actions
improve github actions configuration
2 parents 349a506 + 7f8cce5 commit 4473b85

File tree

2 files changed

+27
-13
lines changed

2 files changed

+27
-13
lines changed

.github/workflows/test.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,35 @@ name: Test
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
7-
branches: [ master ]
7+
branches: [master]
88

99
jobs:
10-
build:
10+
lint:
1111
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Use Node.js
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: 14.x
18+
- run: yarn --frozen-lockfile
19+
- run: yarn lint
20+
test:
1221
strategy:
22+
fail-fast: false
1323
matrix:
24+
os: [ubuntu-latest, windows-latest, macos-latest]
1425
node-version: [10.x, 12.x, 14.x]
26+
runs-on: ${{ matrix.os }}
1527
steps:
16-
- uses: actions/checkout@v2
17-
- name: Use Node.js ${{ matrix.node-version }}
18-
uses: actions/setup-node@v1
19-
with:
20-
node-version: ${{ matrix.node-version }}
21-
- run: yarn --frozen-lockfile
22-
- run: yarn test
28+
- uses: actions/checkout@v2
29+
- name: Use Node.js ${{ matrix.node-version }}
30+
uses: actions/setup-node@v1
31+
with:
32+
node-version: ${{ matrix.node-version }}
33+
- run: yarn --frozen-lockfile
34+
- run: yarn cover:ci
35+
- if: ${{ matrix.os != 'windows-latest' }}
36+
run: bash <(curl -s https://codecov.io/bash) -X gcov

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@
5252
"pretty": "prettier --loglevel warn --write \"lib/**/*.{js,json}\" \"test/*.js\"",
5353
"pretest": "yarn lint",
5454
"test": "mocha --full-trace --check-leaks",
55+
"test:only": "mocha --full-trace --check-leaks",
5556
"precover": "yarn lint",
56-
"cover": "nyc --reporter=html node node_modules/mocha/bin/_mocha",
57-
"pretravis": "yarn lint",
58-
"travis": "nyc --reporter=lcovonly node node_modules/mocha/bin/_mocha"
57+
"cover": "nyc --reporter=html node node_modules/mocha/bin/_mocha --full-trace --check-leaks",
58+
"cover:ci": "nyc --reporter=lcovonly node node_modules/mocha/bin/_mocha --full-trace --check-leaks"
5959
},
6060
"husky": {
6161
"hooks": {

0 commit comments

Comments
 (0)