Skip to content

Commit

Permalink
update gha ci.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
woss committed Apr 24, 2024
1 parent 368ff0a commit e21ec3c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 12 deletions.
55 changes: 44 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,54 @@
name: CI

on: [push, pull_request]

jobs:
test:
name: ${{ matrix.node-version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
legacy:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node-version: [6, 8, 10, 11, 12, 13, 14, 15]
node-version: ['0.10', '0.12', 4.x, 6.x, 8.x, 10.x, 12.x, 13.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/checkout@v3
with:
persist-credentials: false

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

- name: Install
run: |
npm install --production && npm install tape
- name: Run tests
run: |
npm run legacy
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 15.x, 16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
with:
persist-credentials: false

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

- name: Install
run: npm i
- name: Tests
run: npm test
run: |
npm install
- name: Run tests
run: |
npm run test
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
],
"scripts": {
"typescript": "tsc --project ./test/tsconfig.json",
"test": "standard && tape test/test.js test/uniqueness.js test/buffer.js | tap-dot && npm run typescript"
"test": "standard && tape test/test.js test/uniqueness.js test/buffer.js | tap-dot && npm run typescript",
"legacy": "tape test/test.js"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit e21ec3c

Please sign in to comment.