Skip to content

Commit

Permalink
test: switch runner from mocha to node builtin
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson authored Apr 9, 2024
1 parent 32c4f03 commit f523168
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 215 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/ci-test-win.yml

This file was deleted.

33 changes: 18 additions & 15 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,37 @@ name: CI Tests

on: [ push, pull_request ]

jobs:
env:
CI: true

jobs:
ci-test:

needs: [get-lts]
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest ]
node-version: [12.x, 14.x]
os: [ ubuntu-latest, windows-latest ]
node-version: ${{ fromJson(needs.get-lts.outputs.active) }}
fail-fast: false

steps:
- uses: actions/checkout@v2
name: Checkout Code
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}

- name: Install
run: npm install

- name: Test
run: npm run test
- run: npm install
- run: npm run test

env:
CI: true
get-lts:
runs-on: ubuntu-latest
steps:
- id: get
uses: msimerson/node-lts-versions@v1
outputs:
active: ${{ steps.get.outputs.active }}
lts: ${{ steps.get.outputs.lts }}
30 changes: 7 additions & 23 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,16 @@ name: Lint

on: [ push, pull_request ]

jobs:
env:
CI: true

jobs:
lint:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 12.x ]

steps:
- uses: actions/checkout@v2
name: Checkout Code
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-node@v1
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}

- name: Install
run: npm install

- name: Lint
run: npm run lint

env:
CI: true
- uses: actions/setup-node@v4
- run: npm install
- run: npm run lint
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@
},
"dependencies": {},
"devDependencies": {
"eslint": "*",
"mocha": "*",
"eslint": "^8.57.0",
"uglify-es": "*"
},
"scripts": {
"lint": "npx eslint lib test",
"lint": "npx eslint lib",
"lintfix": "npx eslint --fix lib test",
"build": "npx uglifyjs --compress --mangle --wrap=window -o ipaddr.min.js lib/ipaddr.js",
"test": "npx _mocha"
"test": "node --test"
},
"files": [
"lib/",
"lib",
"LICENSE",
"ipaddr.min.js"
],
Expand Down
Loading

0 comments on commit f523168

Please sign in to comment.