Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 33 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
on: [push, pull_request]
name: Build & Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
env:
PUPPETEER_SKIP_DOWNLOAD: "1"
strategy:
fail-fast: false
matrix:
node-version: [8.x, 10.x, 12.x, 14.x]
node-version: [18.x, 20.x, lts/*, current]
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6.3.0
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
npm install --no-progress
- name: Run lint and node tests
run: |
npm config set script-shell bash
npm run lint && npm run test:node

browser-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: npm install
- name: Test
run: npm test
- name: Checkout repository
uses: actions/checkout@v6
- name: Use Node.js lts/*
uses: actions/setup-node@v6.3.0
with:
node-version: lts/*
- name: Install dependencies
run: npm install --no-progress
- name: Run browser tests
run: npm run test:browser
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.nyc_output
coverage/
package-lock.json
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"test:node": "hundreds mocha test/test.js",
"test:browser": "node -e 'process.exit(process.version.startsWith(\"v8.\") ? 0 : 1)' || polendina --cleanup --runner=mocha test/test.js",
"test:ci": "npm run lint && npm run test:node && npm run test:browser",
"test": "npm run lint && npm run test:node && npm run test:browser",
"lint": "standard",
"coverage": "c8 --reporter=text --reporter=html mocha test/test.js && npx st -d coverage -p 8888"
Expand Down