Skip to content

Fix test workflow error on Ubuntu #3

Fix test workflow error on Ubuntu

Fix test workflow error on Ubuntu #3

Workflow file for this run

name: Test

Check failure on line 1 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yml

Invalid workflow file

(Line: 36, Col: 13): Unrecognized named-value: 'ubuntu-latest'. Located at position 14 within expression: matrix.os == ubuntu-latest
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Test on ${{ matrix.os }} using Node.js v${{ matrix.node }}
continue-on-error: true
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
# This should also include Node.js v20, but snapshot testing is only
# available in Node.js v22.3 or later.
node: [22, 24]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node }}
package-manager-cache: false
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest
run_install: true
# Prevent `No usable sandbox!` error on Ubuntu. See:
# https://github.com/puppeteer/puppeteer/issues/13595
- name: Disable AppArmor
if: ${{ matrix.os == ubuntu-latest }}
run:
echo 0 | sudo tee
/proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Run tests
run: pnpm test