Skip to content

Test

Test #12

Workflow file for this run

name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '20 11 * * 1'
workflow_dispatch:
jobs:
audit:
uses: panva/.github/.github/workflows/npm-audit.yml@main
test:
runs-on: ubuntu-latest
continue-on-error: ${{ !startsWith(matrix.node-version, 'lts') }}
strategy:
fail-fast: false
matrix:
node-version:
- lts/erbium # 12
- lts/fermium # 14
- lts/gallium # 16
- lts/hydrogen # 18
- lts/iron # 20
- current
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
id: node
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
check-latest: true
- run: npm install --global npm@8
if: ${{ startsWith(steps.node.outputs.node-version, 'v12') || startsWith(steps.node.outputs.node-version, 'v14') }}
- name: Install dependencies
run: npm clean-install
- run: npm run test
bun:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
id: node
with:
node-version: lts/iron # 20
cache: 'npm'
check-latest: true
- name: Install dependencies
run: npm clean-install
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun ./node_modules/.bin/mocha test/**/*.test.js
electron:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
id: node
with:
node-version: lts/iron # 20
cache: 'npm'
- name: Install dependencies
run: npm clean-install
- run: npx xvfb-maybe npx electron@latest ./test/electron test/**/*.test.js