Skip to content

Commit f523168

Browse files
authored
test: switch runner from mocha to node builtin
1 parent 32c4f03 commit f523168

File tree

6 files changed

+91
-215
lines changed

6 files changed

+91
-215
lines changed

.github/workflows/ci-test-win.yml

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

.github/workflows/ci-test.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,37 @@ name: CI Tests
22

33
on: [ push, pull_request ]
44

5-
jobs:
5+
env:
6+
CI: true
67

8+
jobs:
79
ci-test:
8-
10+
needs: [get-lts]
911
runs-on: ${{ matrix.os }}
10-
1112
strategy:
1213
matrix:
13-
os: [ ubuntu-latest ]
14-
node-version: [12.x, 14.x]
14+
os: [ ubuntu-latest, windows-latest ]
15+
node-version: ${{ fromJson(needs.get-lts.outputs.active) }}
1516
fail-fast: false
1617

1718
steps:
18-
- uses: actions/checkout@v2
19-
name: Checkout Code
19+
- uses: actions/checkout@v4
2020
with:
2121
fetch-depth: 1
2222

23-
- uses: actions/setup-node@v1
23+
- uses: actions/setup-node@v4
2424
name: Use Node.js ${{ matrix.node-version }}
2525
with:
2626
node-version: ${{ matrix.node-version }}
2727

28-
- name: Install
29-
run: npm install
30-
31-
- name: Test
32-
run: npm run test
28+
- run: npm install
29+
- run: npm run test
3330

34-
env:
35-
CI: true
31+
get-lts:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- id: get
35+
uses: msimerson/node-lts-versions@v1
36+
outputs:
37+
active: ${{ steps.get.outputs.active }}
38+
lts: ${{ steps.get.outputs.lts }}

.github/workflows/lint.yml

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,16 @@ name: Lint
22

33
on: [ push, pull_request ]
44

5-
jobs:
5+
env:
6+
CI: true
67

8+
jobs:
79
lint:
8-
910
runs-on: ubuntu-latest
10-
11-
strategy:
12-
matrix:
13-
node-version: [ 12.x ]
14-
1511
steps:
16-
- uses: actions/checkout@v2
17-
name: Checkout Code
12+
- uses: actions/checkout@v4
1813
with:
1914
fetch-depth: 1
20-
21-
- uses: actions/setup-node@v1
22-
name: Use Node.js ${{ matrix.node-version }}
23-
with:
24-
node-version: ${{ matrix.node-version }}
25-
26-
- name: Install
27-
run: npm install
28-
29-
- name: Lint
30-
run: npm run lint
31-
32-
env:
33-
CI: true
15+
- uses: actions/setup-node@v4
16+
- run: npm install
17+
- run: npm run lint

.travis.yml

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

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@
88
},
99
"dependencies": {},
1010
"devDependencies": {
11-
"eslint": "*",
12-
"mocha": "*",
11+
"eslint": "^8.57.0",
1312
"uglify-es": "*"
1413
},
1514
"scripts": {
16-
"lint": "npx eslint lib test",
15+
"lint": "npx eslint lib",
1716
"lintfix": "npx eslint --fix lib test",
1817
"build": "npx uglifyjs --compress --mangle --wrap=window -o ipaddr.min.js lib/ipaddr.js",
19-
"test": "npx _mocha"
18+
"test": "node --test"
2019
},
2120
"files": [
22-
"lib/",
21+
"lib",
2322
"LICENSE",
2423
"ipaddr.min.js"
2524
],

0 commit comments

Comments
 (0)