diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index bc23b2fac7..2c27cab2e9 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -17,11 +17,15 @@ jobs: node-version: [18.x, 20.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + - uses: browser-actions/setup-chrome@v1 + id: setup-chrome + - run: | + echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV - run: npm install - run: npm test - name: Upload coverage to Codecov diff --git a/jest-puppeteer.config.js b/jest-puppeteer.config.js index 31bf265ad4..2170d56c68 100644 --- a/jest-puppeteer.config.js +++ b/jest-puppeteer.config.js @@ -1,5 +1,8 @@ module.exports = { launch: { + // See https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md + args: ['--no-sandbox', '--disable-setuid-sandbox'], + executablePath: process.env.CHROME_BIN || 'chromium', headless: process.env.HEADLESS !== 'false' ? 'new' : false, }, server: [{ diff --git a/package.json b/package.json index 2955f10253..caf0135e96 100644 --- a/package.json +++ b/package.json @@ -122,9 +122,9 @@ "jest": "^29.3.1", "jest-environment-jsdom": "^29.4.3", "jest-fetch-mock": "^3.0.0", - "jest-puppeteer": "^9.0.2", + "jest-puppeteer": "^10.0.0", "jsdom": "^23.0.0", - "puppeteer": "^21.0.0", + "puppeteer": "^23.0.0", "react": "^18.0.0", "react-dnd-test-backend": "^16.0.1", "react-dom": "^18.0.0",