Skip to content

E2E scraper tests

E2E scraper tests #228

Workflow file for this run

name: E2E scraper tests
env:
PUPPETEER_DOWNLOAD_BASE_URL: https://storage.googleapis.com/chrome-for-testing-public
on:
workflow_dispatch:
schedule:
# Runs at 2 am every day
- cron: '0 2 * * *'
jobs:
build_and_test:
name: Build & Test
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Cancel Workflow Action
uses: styfle/cancel-workflow-action@0.13.1
with:
access_token: ${{ github.token }}
- name: Checkout repository
uses: actions/checkout@v7
- name: Use Node.js 24
uses: actions/setup-node@v7
with:
node-version: 24
- name: Turbo cache
id: turbo-cache
uses: actions/cache@v6
with:
path: .turbo
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
turbo-${{ github.job }}-${{ github.ref_name }}-
- name: Install pnpm and dependencies
uses: apify/actions/pnpm-install@v1.4.0
- name: Install browsers
run: |
pnpm exec puppeteer browsers install chrome
pnpm exec playwright install chromium
- name: Build
run: pnpm ci:build
# ubuntu-24.04 restricts unprivileged user namespaces via AppArmor, which breaks
# Chrome's sandbox and fails the browser-launch tests. Re-enable it for the runner.
- name: Enable unprivileged user namespaces (Chrome sandbox)
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Test
run: pnpm test:e2e
env:
APIFY_TOKEN: ${{ secrets.APIFY_SCRAPER_TESTS_API_TOKEN }}