https://playwright.dev/docs/ci-intro#setting-up-github-actions Answer from RoyalsFanKCMe on reddit.com
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.
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 369 users
Forked by 50 users
Languages JavaScript
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
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
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
11:12
Playwright and GitHub Actions Setup FROM SCRATCH (Run Your Tests ...
How to Run Playwright Tests in GitHub Actions | Complete ...
How to Set Up Your First Playwright GitHub Action | Step-by ...
20:24
Playwright Testing and GitHub Actions Tutorial: Run Your Playwright ...
#104 How to Run Playwright Automation Tests Using GitHub Actions ...
#105 How to Run Playwright Automation Tests Using GitHub Actions ...
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
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?
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
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
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
DevOps.dev
blog.devops.dev › integrating-playwright-in-ci-with-github-actions-and-docker-7baafe76de99
Integrating Playwright in CI with GitHub Actions and Docker | by thanan | DevOps.dev
February 10, 2025 - Caches the node_modules and playwright binariesfolder to speed up dependencies installation using actions/cache@v4. Installs necessary Playwright browsers with npx playwright install --with-deps if the cache isn't hit. Executes Playwright tests using npx playwright test and extracts the number of failed tests from the Playwright report. Join Medium for free to get updates from this writer. ... Adds a comment to the pull request with the test results. ... Deploys the test report to GitHub Pages using actions/deploy-pages@v4 if there is any failure in test case execution
Builder.io
builder.io › blog › end-to-end-testing-with-playwright-and-github-actions
End-to-End Testing With Playwright And Github Actions
October 10, 2023 - What’s great about Github Actions worker integration is that a passing test, or failed one, also shows in your GitHub interface. For example, for every commit to Partytown we’ve been able to see if the code committed passed or failed. In our Partytown repo, we’re actually using two different jobs within the workflow. One is set up to run on a Mac with Safari, and the other is running on Ubuntu to test Chromium. Playwright certainly met our use cases for each of our projects, but it’s not the only great testing tool in town, and in fact, I encourage you to also do a good review of Cypress and choose what works best for your team.
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 13 users
Languages TypeScript 98.7% | JavaScript 1.3%
Vercel
sergeipetrukhin.vercel.app › github-actions
Automate Playwright Tests in Next.js 14 Using GitHub Actions
This guide walks you through setting up GitHub Actions to execute Playwright tests for a Next.js 14 project.
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.