TOPIC 31/6020 MINNOT STARTED

Playwright in a pipeline: GitHub Actions and containers

Run Playwright tests on every change in a GitHub Actions workflow. Choose between installing browsers and using the official Docker image. Keep the report when a run fails.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: an assembly line that tests every product on its way out. A factory does not trust one worker to check things when they feel like it. Each product passes the same test station before it leaves. If the station finds a fault, the product stops.

Daily List is a to-do list app. Tom has Playwright tests that pass on his laptop. Mei asks a fair question. Who runs them when Tom is on holiday? Leo sends a change many times a day.

The picture has a limit. A factory station checks a product once. A pipeline test can pass on Monday and fail on Tuesday with no code change, if the test is flaky.

What it is: Playwright is a free library from Microsoft that drives a real browser from code. This topic is one slice of that library: running those tests on every change. A is the recipe. means continuous integration, the habit of checking every change the same way. GitHub Actions is GitHub's service for that recipe. The file lives at .github/workflows/playwright.yml. A report artifact is the saved HTML (HyperText Markup Language) report. A Playwright Docker image is a ready-made container that already holds the browsers. The nearest neighbour is Tom running npx playwright test on his laptop. That run stops when he is away.

Why it matters: Laptop-only tests die when Tom is away. Leo can merge a broken Add task journey and nobody sees it until Lily does. A pipeline run puts a result beside the change, on a clean machine. Red means stop. Green means the checked journeys passed on that machine.

(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)

PLAIN WORDS · 5 in this section
playwright
a free Microsoft tool that drives a browser for tests
flaky
passing sometimes and failing sometimes with no product change
workflow
the steps a piece of work follows, start to finish
github
a web site that hosts code and runs checks
hypertext
text that links to other pages

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB A cloud machine runs the same tests on every change and keeps the evidence when something fails.

  1. Change arrives
  2. Machine starts
  3. Tests run
  4. Notes saved
Every change, same station, notes kept

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The test station on the lineThe continuous integration (CI) workflow run
The product that arrivesA change pushed by a developer
The red stop lightA failed run on the pull request
The inspector's notesThe saved report and trace

WHERE THIS PICTURE STOPS

  • A product is checked once. A pipeline test can pass and fail on the same code if it is flaky.
  • A factory station is built once. A workflow file changes with the project.
  • A station does not need to be told what the product needs. A new cloud machine needs browsers installed.

HOOK

Every change, same station, notes kept.

REMEMBER IT THIS WAY

A sequence: the real steps, in order.

Red means stop, green means go on. Ask three things of the line: does it run on every change, install the browsers, and keep the report?

What each part of the trick stands for
In the trickWhat it stands for
every changeeach push starts a run
browsersinstalled on the cloud machine
reportthe saved report and trace

TELL A FRIEND

An assembly line where every product passes the same test station and the inspector keeps notes. A Playwright pipeline does this for each change.

OFTEN MIXED UP WITH Where tests run in a pipeline. The pipeline lesson shows where tests sit among build steps. This lesson makes the Playwright tests one of those steps and saves the evidence.

Sources & standards — 5 sources
  1. Market practice

    Continuous Integration (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Shows a GitHub Actions workflow that installs dependencies, runs the install command with --with-deps, runs the tests and uploads the report folder as an artifact with an upload step that still runs after test failures. Also shows a container-based job that uses the official image. Vendor documentation or practitioner guidance, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  2. Market practice

    Docker (Playwright documentation) ↗ — Microsoft (Playwright) · The official image is published at mcr.microsoft.com/playwright, holds the browsers and their system dependencies but not the Playwright package, and is meant for testing and development (search excerpt, page not opened)

    Says the official image is published at mcr.microsoft.com/playwright, holds the browsers and their system dependencies but not the Playwright package, uses tags that name the Playwright version and an Ubuntu release, is for testing and development, and should not be used to visit untrusted websites. Vendor documentation or practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    Sharding (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Shows splitting a suite into shards run on separate machines, and that workers are processes on one machine while shards are portions of the suite on separate jobs. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  4. Market practice

    Understanding GitHub Actions (GitHub Docs) ↗ — GitHub · GitHub Actions workflows are files of jobs and steps that run when an event such as a push happens (search excerpt, page not opened)

    Says a workflow runs on an event, holds jobs that run in parallel by default, and each job holds steps on one runner. Vendor documentation. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  5. Market practice

    Docker (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes running a Playwright server in a container and connecting to it. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

PRACTISE AND KEEP

Sources for this topic — 7 sources
  1. Market practice

    Continuous Integration (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Shows a GitHub Actions workflow that installs dependencies, runs the install command with --with-deps, runs the tests and uploads the report folder as an artifact with an upload step that still runs after test failures. Also shows a container-based job that uses the official image. Vendor documentation or practitioner guidance, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  2. Market practice

    Docker (Playwright documentation) ↗ — Microsoft (Playwright) · The official image is published at mcr.microsoft.com/playwright, holds the browsers and their system dependencies but not the Playwright package, and is meant for testing and development (search excerpt, page not opened)

    Says the official image is published at mcr.microsoft.com/playwright, holds the browsers and their system dependencies but not the Playwright package, uses tags that name the Playwright version and an Ubuntu release, is for testing and development, and should not be used to visit untrusted websites. Vendor documentation or practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    Sharding (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Shows splitting a suite into shards run on separate machines, and that workers are processes on one machine while shards are portions of the suite on separate jobs. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  4. Market practice

    Understanding GitHub Actions (GitHub Docs) ↗ — GitHub · GitHub Actions workflows are files of jobs and steps that run when an event such as a push happens (search excerpt, page not opened)

    Says a workflow runs on an event, holds jobs that run in parallel by default, and each job holds steps on one runner. Vendor documentation. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  5. Market practice

    Variables reference (GitHub Docs) ↗ — GitHub · Lists the default environment variables of GitHub Actions and says CI is always set to true in a workflow run, and that it can be overwritten (search excerpt, page not opened)

    Lists the default environment variables of GitHub Actions and says CI is always set to true in a workflow run, and that it can be overwritten. Vendor documentation, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  6. Market practice

    Docker (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes running a Playwright server in a container and connecting to it. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  7. Implementation-specific

    Setting up CI | Playwright ↗ — Microsoft (Playwright) · Playwright documentation, Setting up CI: generated configuration reads the CI variable for retries, workers and forbidOnly; examples inspected, not executed.

    Complete extracted primary article; examples inspected, not executed · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.