Skip to content

Commit

Permalink
test: switch runner from mocha to node builtin
Browse files Browse the repository at this point in the history
- test: remove useless done
  - they are only required for callback style async tests
- test: move test file into lib
- pkg: rm .travis.yml
- ci: update test runners
- ci: automatically test LTS versions
- ci: update lint workflow
  • Loading branch information
msimerson committed Apr 8, 2024
1 parent 32c4f03 commit 88c501b
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 217 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.

Loading

0 comments on commit 88c501b

Please sign in to comment.