https://playwright.dev/docs/ci-intro#setting-up-github-actions Answer from RoyalsFanKCMe on reddit.com
GitHub
github.com › microsoft › playwright-github-action
GitHub - microsoft/playwright-github-action: Run Playwright tests on GitHub Actions · GitHub
January 23, 2025 - This GitHub Action can be combined with the Upload Artifact action to upload test artifacts (like screenshots or logs). steps: - uses: microsoft/playwright-github-action@v1 - name: Install dependencies and run tests run: npm install && npm test - uses: actions/upload-artifact@v2 if: ${{ always() }} with: name: test-artifacts path: path/to/artifacts
Starred by 370 users
Forked by 50 users
Languages JavaScript
Playwright
playwright.dev › setting up ci
Setting up CI | Playwright
When installing Playwright using the VS Code extension or with npm init playwright@latest, you are given the option to add a GitHub Actions workflow. This creates a playwright.yml file inside a .github/workflows folder containing everything you need so that your tests run on each push and pull request into the main/master branch.
What to look out for running Playwright in GitHub Actions?
not that I can think of; it is very straightforward. combining reports from shards is a little complicated but that's all covered in the docs. keeping the container version up to date with your playwright version is tedious I guess but it's not difficult. More on reddit.com
How to use Playwright with GitHub Action
https://playwright.dev/docs/ci-intro#setting-up-github-actions More on reddit.com
Playwright + Github Actions. I want a nice reporting!
Why not use Playwright's HTML report? More on reddit.com
Some questions about Playwright and Github Actions
Your choice, but it's usually considered best practice to have the tests in the same repo as the app. You'd still use the checkout action, just do a with: repository: repo_you_want. You'll need to provide secrets etc as needed. Add a step that confirms deployment, then after step is successful just run the tests on the deployment. More on reddit.com
Videos
20:24
Playwright Testing and GitHub Actions Tutorial: Run Your Playwright ...
11:12
Playwright and GitHub Actions Setup FROM SCRATCH (Run Your Tests ...
#104 How to Run Playwright Automation Tests Using GitHub Actions ...
#105 How to Run Playwright Automation Tests Using GitHub Actions ...
46:03
Playwright TypeScript - Part 12: Playwright CI/CD with GitHub Actions ...
12:13
Playwright beginners Tutorial - Integrate Playwright with Github ...
Reddit
reddit.com › r/playwright › how to use playwright with github action
r/Playwright on Reddit: How to use Playwright with GitHub Action
November 18, 2024 -
Hi guys,
I just started using playwright for e2e testing of my web app. I'm thinking to use it with Github Action for testing.
The question is, how to use it with Github action? I usually run a localhost:3000 in my local computer, but how to do that with Github action?
GitHub
github.com › marketplace › actions › run-playwright-tests
Run Playwright tests · Actions · GitHub Marketplace · GitHub
This GitHub Action can be combined with the Upload Artifact action to upload test artifacts (like screenshots or logs). steps: - uses: microsoft/playwright-github-action@v1 - name: Install dependencies and run tests run: npm install && npm test - uses: actions/upload-artifact@v2 if: ${{ always() }} with: name: test-artifacts path: path/to/artifacts
Autify
autify.com › blog › playwright-github-actions
Getting Started with Integrating Playwright and GitHub Actions
March 25, 2025 - Open '.github/workflows/playwright.yml' and add the following workflow: on: [push, pull_request] jobs: test: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3 - name: Set up Node.js uses: actions/setup-node@v3 with: node-version: 18 - name: Install dependencies run: npm ci - name: Install Playwright browsers run: npx playwright install --with-deps - name: Run Playwright tests run: npx playwright test
Playwright
playwright.dev › continuous integration
Continuous Integration | Playwright
GitHub Actions support running jobs in a container by using the jobs.<job_id>.container option. This is useful to not pollute the host environment with dependencies and to have a consistent environment for e.g. screenshots/visual regression testing across different operating systems. ... name: Playwright Tests on: push: branches: [ main, master ] pull_request: branches: [ main, master ] jobs: playwright: name: 'Playwright Tests' runs-on: ubuntu-latest container: image: mcr.microsoft.com/playwright:v1.58.2-noble options: --user 1001 steps: - uses: actions/checkout@v5 - uses: actions/setup-node@v6 with: node-version: lts/* - name: Install dependencies run: npm ci - name: Run your tests run: npx playwright test
Playwright
playwright.dev › setting up ci
Setting up CI | Playwright Python
To add a GitHub Actions file, first create .github/workflows folder and inside it add a playwright.yml file containing the example code below so that your tests run on each push and pull request for the main/master branch.
Steve Fenton
stevefenton.co.uk › blog › 2025 › 09 › playwright-insteall-github-actions
Installing Playwright In GitHub Actions | Steve Fenton
September 7, 2025 - Here’s the section from my GitHub Action that installs the browsers. It has never been a problem before, but I’ll explain how this is a little lazy and how I could streamline the installation to bring it under my 20-minute timeout. - name: Install Playwright Browsers run: npx playwright install --with-deps
GitHub
github.com › estruyf › playwright-github-actions-reporter
GitHub - estruyf/playwright-github-actions-reporter: GitHub Actions reporter for Playwright · GitHub
import { defineConfig } from '@playwright/test'; import type { GitHubActionOptions } from '@estruyf/github-actions-reporter'; export default defineConfig({ reporter: [ ['@estruyf/github-actions-reporter', <GitHubActionOptions>{ title: 'My custom title', useDetails: true, showError: true }] ], });
Starred by 82 users
Forked by 12 users
Languages TypeScript 98.7% | JavaScript 1.3%
Playwright
playwright.dev › setting up ci
Setting up CI | Playwright .NET
To add a GitHub Actions file, first create .github/workflows folder and inside it add a playwright.yml file containing the example code below so that your tests run on each push and pull request for the main/master branch.
Radekmie
radekmie.dev › blog › on-playwright-in-github-actions
On Playwright in GitHub Actions · @radekmie’s take on IT and stuff
A complete step by step guide on how to setup Playwright in GitHub Actions with parallelization of both browsers and test cases.
Foosel
foosel.net › til › how to run playwright on github actions
How to run Playwright on GitHub Actions | foosel.net
January 31, 2023 - # Run npm ci and get Playwright version - name: 🏗 Prepare Playwright env working-directory: ./path/to/tests run: | npm ci PLAYWRIGHT_VERSION=$(npm ls --json @playwright/test | jq --raw-output '.dependencies["@playwright/test"].version') echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV # Cache browser binaries, cache key is based on Playwright version and OS - name: 🧰 Cache Playwright browser binaries uses: actions/cache@v3 id: playwright-cache with: path: "~/.cache/ms-playwright" key: "${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}" restore-keys: | ${{ runner.os }}
Reddit
reddit.com › r/softwaretesting › what to look out for running playwright in github actions?
r/softwaretesting on Reddit: What to look out for running Playwright in GitHub Actions?
July 23, 2024 -
The instructions for using Playwright's container sound straightforward, but I wondered if there's any common issues I should look out for? Especially as a test suite gets bigger. Google hasn't turned up many answers, so figured I'd ask here.
Top answer 1 of 2
5
not that I can think of; it is very straightforward. combining reports from shards is a little complicated but that's all covered in the docs. keeping the container version up to date with your playwright version is tedious I guess but it's not difficult.
2 of 2
2
The only downside for me is that github actions doesn't integrate well with Playwright html logging/tracing. You will have to download a zip file as an artifact and then run the report locally or through playwrights trace tool to view the report.