Skip to content

Commit 6fe00d6

Browse files
authored
deps: upgrade dev deps (#10)
* deps: upgrade dev deps * test: use github flow
1 parent 822a09f commit 6fe00d6

File tree

5 files changed

+50
-42
lines changed

5 files changed

+50
-42
lines changed

.github/workflows/nodejs.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ${{ matrix.os }}
16+
17+
strategy:
18+
matrix:
19+
node-version: [4.x, 6.x, 8.x, 10.x, 12.x]
20+
os: [ubuntu-latest, windows-latest, macos-latest]
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v1
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
- run: npm i
29+
- run: npm run ci
30+
env:
31+
CI: true

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

appveyor.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

package.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"scripts": {
1111
"test": "npm run lint && egg-bin test",
1212
"test-cov": "egg-bin cov",
13-
"lint": "eslint index.js test",
13+
"lint": "eslint index.js test --fix",
1414
"ci": "npm run lint && npm run test-cov",
1515
"autod": "autod -w --prefix '^'"
1616
},
@@ -20,12 +20,12 @@
2020
},
2121
"devDependencies": {
2222
"@types/node": "^12.0.8",
23-
"autod": "*",
24-
"egg-bin": "1",
23+
"autod": "^3.1.0",
24+
"egg-bin": "^1.11.1",
2525
"egg-ci": "^1.8.0",
26-
"eslint": "4",
27-
"eslint-config-egg": "6",
28-
"typescript": "^3.5.1"
26+
"eslint": "^4.19.1",
27+
"eslint-config-egg": "^6.0.0",
28+
"typescript": "^3.9.3"
2929
},
3030
"homepage": "https://github.com/node-modules/runscript",
3131
"repository": {
@@ -46,9 +46,8 @@
4646
},
4747
"ci": {
4848
"version": "4, 6, 8, 10, 12",
49-
"command": {
50-
"appveyor": "ci"
51-
}
49+
"type": "github",
50+
"npminstall": false
5251
},
5352
"author": "fengmk2 <[email protected]> (https://fengmk2.com)",
5453
"license": "MIT"

test/runscript.test.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,17 @@ describe('test/runscript.test.js', () => {
2323
.catch(err => {
2424
console.log(err);
2525
assert(err.name === 'RunScriptError');
26-
assert(err.exitcode === 255);
26+
// node 10 on windows -1 equal to 4294967295
27+
assert(err.exitcode === 255 || err.exitcode === 4294967295);
28+
});
29+
});
30+
31+
it('should reject on exit code = 1', () => {
32+
return runScript('node -e "process.exit(1)"')
33+
.catch(err => {
34+
console.log(err);
35+
assert(err.name === 'RunScriptError');
36+
assert(err.exitcode === 1);
2737
});
2838
});
2939

0 commit comments

Comments
 (0)