For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quick Start

Running Playwright tests in Parallel in GitHub Actions using Matrix Workflow

Check out the example repository https://github.com/currents-dev/currents-examples

Quick Start

The example workflow file below shows how to run Playwright tests in GitHub actions.

The workflow above is the simplest way to get started. As the test suite grows, parallelization helps keep execution time fast.

Parallelization

The GitHub Actions matrix execution strategy can create multiple containers that run Playwright tests in parallel.

Each container receives a unique set of tests. This makes the browser test suite finish faster and gives feedback sooner.

Tests Parallelization with Github Actions
Tests Parallelization with Github Actions

This can be done with Playwright Sharding. Playwright can split tests between multiple CI machines using the --shard CLI flag. The examples below show how to set up sharding and orchestration.

Looking for more ways to speed up CI? Read our CI Optimization page.

Examples

The example repository showcases running Playwright tests in GitHub Actions. We've included several config files to exemplify the workflows:

  • test-basic-pwc.yml - run Playwright tests in parallel using 3 shards of GitHub Actions Matrix and pwc command.

  • test-basic-reporter.yml - run Playwright tests in parallel run using 3 shards of GitHub Actions Matrix and configuring Currents Reporter in playwright.config.ts.

  • test-or8n.yml - run Playwright tests in parallel Playwright using Orchestration Setup and GitHub Actions Matrix. Currents Orchestration speeds up CI runs by up to 40% (compared to native sharding) by optimally balancing tests between the available machines.

  • reruns-or8n.yml - Orchestration failed-only reruns.

  • argos-example.yml - run Playwright tests in parallel using Currents Orchestration, use Argos CI for visual testing.

Last updated

Was this helpful?