Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
To run an existing Playwright suite in GitHub Actions, add a workflow YAML file under .github/workflows. Have it check out the repository, set up Node.js, install the lockfile-defined dependencies, install Playwright browsers and Linux system dependencies, run the tests, then upload the HTML report as an artifact. The example below uses npm and a Linux-hosted runner; adjust its branch names and runtime settings for your repository.
Before you add the workflow
Check that the repository contains Playwright tests, a Playwright configuration file, and the package manifest and lockfile expected by its package manager. The npm example below uses npm ci, which installs from the committed npm lockfile. If the project uses another package manager, translate the dependency-install command and lockfile assumptions rather than copying the npm command unchanged.
For a new project, Playwright’s installation setup can scaffold a configuration, example tests, package files, and optionally a GitHub Actions workflow. Treat generated workflow YAML as a starting point: confirm its triggers, runtime, and actions suit your repository. See the Playwright installation guide.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallAdd a workflow file
Create .github/workflows/playwright.yml in the repository. GitHub discovers workflow YAML files in that directory; playwright.yml is the filename used in Playwright’s documentation.
#1 Best Overall
- Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM)
- Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
- CanaKit Turbine Black Case for the Raspberry Pi 5
- CanaKit Low Noise Bearing System Fan
- Mega Heat Sink - Black Anodized
This npm-based example runs on pushes and pull requests targeting main, installs browser binaries and their Linux dependencies, runs the suite, and uploads the HTML report even when tests fail:
name: Playwright Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- name: Upload Playwright report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
retention-days: 30
The action major versions and Node selector above are sample choices, not a promise that they are best for every repository. Check current action versions and the runtime your project supports before adopting the file. The timeout-minutes value is an upper bound for the job, not an expected test duration; tune it for your suite.
Change branch triggers to match your repository
The workflow triggers on pushes and pull requests targeting main. If your default or release branch has another name, replace main in both places. You can list several branch names in the arrays. Remove or add trigger types only if they match how your team wants CI to run.
Keep the report upload after a failing test
The upload step’s if: ${{ !cancelled() }} condition permits it to run after a test failure while avoiding upload after the workflow has been cancelled. This makes the report available to diagnose ordinary failures. The artifact name is playwright-report, and the example retains it for 30 days; choose a retention period that fits the team’s needs and repository policy.
What each workflow step does
- Check out the code:
actions/checkoutmakes the repository files available to subsequent steps. - Set up Node.js:
actions/setup-nodeselects a Node runtime. Choose a supported version consistent with the application and Playwright project. - Install locked dependencies:
npm ciuses the npm lockfile for a clean CI install. Commit the matching lockfile; if it is missing or out of sync with the package manifest, correct that before relying on this command. - Install browsers and operating-system dependencies:
npx playwright install --with-depsinstalls the browser binaries Playwright needs and the Linux dependencies required to launch them on the runner. - Run the suite:
npx playwright testruns the configured Playwright tests and returns their result to the workflow. A failing test therefore fails the job, while the report step can still preserve diagnostic output. - Upload the report: the artifact step stores
playwright-report/with that workflow run for later download.
For the documented CI setup and current implementation details, consult Playwright’s CI guide.
Rank #2
- Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM)
- Includes Pre-Loaded 32GB EVO+ Micro SD Card (Class 10), USB MicroSD Card Reader
- CanaKit Premium High-Gloss Raspberry Pi 4 Case with Integrated Fan Mount, CanaKit Low Noise Bearing System Fan
- CanaKit 3.5A USB-C Raspberry Pi 4 Power Supply (US Plug) with Noise Filter, Set of Heat Sinks, Display Cable - 6 foot (Supports up to 4K60p)
- CanaKit USB-C PiSwitch (On/Off Power Switch for Raspberry Pi 4)
Run it and find the result
- Commit and push the workflow file to a branch covered by its trigger.
- Open the repository’s Actions tab and select the Playwright workflow run.
- Inspect the job steps and logs. A red test step indicates the test command failed; expand it for the test output.
- When the upload step completed, find
playwright-reportin the run’s Artifacts area and download it.
The HTML report needs to be served by a web server for local viewing to work as expected. Follow Playwright’s GitHub Actions setup guide for report access details.
Choose a CI parallelism strategy
Start with one worker
Playwright recommends setting workers to 1 in CI to prioritize stability and reproducibility. If you want to make that policy explicit, set it in the Playwright configuration or pass the worker option to the test command, for example npx playwright test --workers=1. The test configuration is often the better place when that behavior should apply consistently to CI runs.
Recommended Free Tools
Use sharding to scale a larger suite
For larger suites, Playwright supports sharding: distribute tests across multiple CI jobs instead of increasing the worker count in one job. Sharding requires extra workflow setup to create multiple jobs and collect results or reports as appropriate. See Playwright’s sharding guide for the supported approach.
A stronger self-hosted runner may also support more workers, but changing parallelism can affect stability and reproducibility. Increase it deliberately and observe how the suite behaves rather than assuming more workers will always improve the result.
Browser downloads and caching
The simplest baseline is to install browsers during each run with npx playwright install --with-deps. Playwright does not recommend browser caching as a default speed optimization: restoring a cache can take about as long as downloading browser binaries, and Linux system dependencies cannot be cached this way.
Rank #3
- Not including the Raspberry Pi 5 (8GB), the Crowpi advanced version comes with the Raspberry Pi 5
- ELECROW Black Case for the Raspberry Pi 5, CrowPi is equipped with a 9-inch HD touchscreen along with a camera; All the regular components used in DIY electronics are packed into the CrowPi development board, such as LCD, LED matrix, buzzer, light sensor, PIR sensor, ultrasonic sensor, IR sensor, etc
- Raspberry Pi Sensors: The Crowpi raspberry pi 5 programming kit is jam-packed with lots of buttons such as 19 different sensors in a tidy easy to use package; You don't have to wait and wire things
- Build Quality: Solid ABS shell and well made components in one place make it strong and convenient to travel
- Programming Lessons: This raspberry pi 5 learning kit ships with step by step instructions and provides 21 lessons to take you through identifying components reading code and running it in the terminal
If you choose to cache browser binaries anyway, key the cache against a hash of the installed Playwright version so the cached browsers correspond to that version. Caching browser files does not replace installing the Linux system dependencies needed by the runner. For most teams, start with the documented install command and add caching only after measuring its effect in their own CI environment.
Alternative: run in a Playwright container
Installing dependencies on the runner is the straightforward documented baseline. A Playwright container image is another option when you want a consistent browser environment and to avoid installing browser dependencies directly on the host. It adds container-image selection and maintenance to the workflow, so confirm the image and Playwright version stay aligned with the project. The CI guide discusses this option alongside runner installation.
Protect reports, traces, and logs
Playwright reports, trace files, and workflow logs can expose test credentials, access tokens, staging data, test source, or application source. Store artifacts only where the people who need them can access them; use an appropriately trusted artifact store, or encrypt files before uploading or sharing them when required by your security policy. Be especially cautious about making reports public.
Do not assume a workflow running for a pull request from a fork can access repository secrets. Playwright’s setup guide calls out that limitation for its Azure Storage report-publishing example. Avoid adding secret-based publication steps to workflows handling untrusted pull requests without first designing for that security boundary.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot common failures
The workflow does not start
Check that the YAML file is in .github/workflows/, is valid YAML, and that the push or pull-request target branch matches one of the names in the trigger. A workflow configured only for main will not run for a pull request targeting a differently named branch.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Rank #4
- Fully assembled for plug-and-play operation
- Includes Raspberry Pi 5 with 8GB RAM
- 256 GB PCIe Pi NVMe SSD (Pre-loaded with Pi 64-Bit OS)
- M.2 HAT+
- CanaKit Turbine Black Case for the Pi 5
npm ci fails
Confirm the repository includes the npm lockfile and that it agrees with the package manifest. If the project uses a different package manager, use that manager’s appropriate frozen or lockfile-based install command and commit its lockfile rather than applying the npm example blindly.
A browser will not launch
On Linux, ensure the workflow ran npx playwright install --with-deps successfully. For browser launch diagnostics, Playwright documents running tests with DEBUG=pw:browser npx playwright test; use the resulting logs to investigate the launch failure.
Tests pass locally but fail in CI
Check the failing test output and report, then compare the local and CI runtime, browser installation, environment variables, and available services. CI-specific timing or parallelism can reveal reliability problems; the recommended single worker is a useful stability baseline. Avoid treating a retry or a larger timeout as a diagnosis unless the failure points to timing.
The report is missing
Check whether the test run reached the upload step and whether playwright-report/ exists. The example’s upload condition skips only cancelled runs, but an artifact cannot contain a report that was never generated. In the Actions run, inspect the upload step and its log for a path or artifact error.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
A forked pull request cannot publish a report externally
Forked pull-request workflows do not receive repository secrets in the secret-based Azure Storage publishing example described by Playwright. Keep the report as a workflow artifact or design a publication flow that does not expose secrets to untrusted code.
Best Value
- 【What you Get】You will get 1*Pi 5 8GB Single Board,1*RasTech Case,1*Active Cooler,1*Screwdriver,1*Installation instructions,12-month free warranty, lifetime service, 24-hour prompt and friendly response.
- 【More Connectors】There are two USB 3.0 ports(5Gbps simultaneously) and two USB 2.0 ports, which triple total bandwidth ,support any combination of up to two cameras or displays. Peak SD card performance is doubled through support for the SDR104 high-speed mode. It provides a smooth desktop experience for you. Offer Gigabit Ethernet and a PCIe interface, along with dual-band Wi-Fi and Bluetooth 5.0/BLE wireless capability. The RasTech Pi 5 Kit use the new 27W 5.1V 5A USB-C power connector.
- 【 Support Dual 4Kp60 Display 】Each of the two microHDMI sockets can control a 4K display at 60 Hertz, now support HDR, offering super HD video for media streaming projects. RPi 5 is the first RPi model that comes with a PCI Express port (PCIe 2.0 x1 with 500 MB/s) to attach SSDs (requires separate M.2 HAT).
- 【 Excellent Chips And Applications】Pi 5 is a full-size Pi computer using silicon built in-house at Pi. The RP1 “southbridge” provides the bulk of the I/O capabilities for Pi 5. Pi 5 is more friendly and convenient in the development of Internet of Things, Web development, machine identification, automatic control and other electronic equipment applications and network.
- 【 Faster CPU, Better GPU 】 Pi 5 features a Broadcom BCM2712 64-bit quad-core Arm Cortex-A76 processor running at 2.4GHz, it delivers a 2–3× increase in CPU performance relative to RaspberryPi 4. The 800MHz VideoCore VII GPU is compatible to OpenGL ES 3.1 and Vulkan 1.2, substantial uplift in graphics performance. Pi 5 Offers lightning-fast CPU speed, a PCI Express interface, a Real Time Clock (RTC) and a power button and runs significantly cooler than Pi 4.
Or skip the browser setup
If your goal is simply a clean screenshot of a live webpage rather than running browser tests against your application, ScreenshotNeo can return an image with one GET request. Its cookie/consent handling removes supported banners, newsletter popups, and chat widgets before capture; those cleanup steps can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, with response headers identifying the page verdict and billing status. ScreenshotNeo also provides an MCP server with tools for AI agents.
Example using cURL; see the ScreenshotNeo API documentation for options:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo’s free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. This is for capturing webpage screenshots, not a replacement for a Playwright test suite. Learn about ScreenshotNeo or sign up free for 1,000 screenshots a month with no card.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesFrequently Asked Questions
Can I use a different workflow filename?
Yes. GitHub discovers workflow YAML files in .github/workflows; the filename does not have to be playwright.yml.
Can a GitHub Actions run show the Playwright HTML report without downloading it?
The workflow setup described here uploads the report as an artifact for download; Playwright’s guide says the report needs a web server for local viewing.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

