Skip to content

Disable AppArmor in jobs that use Puppeteer (#1630) #2453

Disable AppArmor in jobs that use Puppeteer (#1630)

Disable AppArmor in jobs that use Puppeteer (#1630) #2453

Workflow file for this run

name: Test and lint
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
# Starting with Ubuntu 23+, a security feature prevents running Puppeteer
# by default. It needs to be disabled. Using the "easiest" option, see:
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
# https://github.com/puppeteer/puppeteer/pull/13196/files
- name: Disable AppArmor
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Checkout latest version of release script
uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ env.GITHUB_TOKEN }}
run: |
npm run test
- name: Lint
run: npm run lint