{"id":13650877,"url":"https://github.com/microsoft/playwright-github-action","last_synced_at":"2025-10-06T05:30:40.036Z","repository":{"id":38184237,"uuid":"244998990","full_name":"microsoft/playwright-github-action","owner":"microsoft","description":"Run Playwright tests on GitHub Actions","archived":false,"fork":false,"pushed_at":"2024-11-15T17:33:20.000Z","size":127,"stargazers_count":341,"open_issues_count":0,"forks_count":49,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-01-17T19:19:01.725Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-04T20:37:38.000Z","updated_at":"2025-01-16T04:29:57.000Z","dependencies_parsed_at":"2024-01-03T05:37:53.585Z","dependency_job_id":"f087c19c-c5c1-415d-a983-b6c3eef631c4","html_url":"https://github.com/microsoft/playwright-github-action","commit_stats":{"total_commits":64,"total_committers":13,"mean_commits":4.923076923076923,"dds":0.703125,"last_synced_commit":"91d778e7ba32fe5946d69a20848327c9718cdbc2"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fplaywright-github-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fplaywright-github-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fplaywright-github-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fplaywright-github-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/playwright-github-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235497423,"owners_count":18999659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T02:00:41.980Z","updated_at":"2025-10-06T05:30:34.755Z","avatar_url":"https://github.com/microsoft.png","language":"JavaScript","funding_links":[],"categories":["Integrations"],"sub_categories":[],"readme":"# Playwright GitHub Action\r\n\r\n[![tests](https://github.com/microsoft/playwright-github-action/actions/workflows/tests.yml/badge.svg)](https://github.com/microsoft/playwright-github-action/actions/workflows/tests.yml)\r\n\r\nSet up GitHub Actions to run cross-browser tests on Chromium, WebKit and Firefox with [Playwright](https://github.com/microsoft/playwright).\r\n\r\n## ❌ You don't need this GitHub Action\r\n\r\n**We recommend using the Playwright CLI instead of this GitHub Action**.\r\n\r\nOne of the reasons for deprecating the GitHub Actions is that it doesn't know which version of Playwright is installed,\r\nwhich then requires installing many more dependencies to ensure support.\r\n\r\nWe highly discourage the use of the GitHub Action. See next section for using the CLI.\r\n\r\n## ✅ Use the Playwright CLI\r\n\r\nStarting with Playwright v1.8.0 it [includes a CLI](https://playwright.dev/docs/cli#install-system-dependencies) that installs all required browser dependencies.\r\n\r\n### To install dependencies with a CLI:\r\n\r\n```sh\r\nnpx playwright install --with-deps # install browsers + dependencies for all browsers\r\nnpx playwright install chromium --with-deps # install browsers + dependencies for Chromium only\r\n```\r\n\r\n### Playwright CLI with GitHub Actions CI\r\n\r\nFollowing is an example usage of the Playwright CLI with a GitHub Actions workflow file.\r\nIt shows a `tests_e2e` job which includes steps in which the Playwright CLI invokes the\r\ninstallation of required dependencies (headless browsers, etc) and then invokes the\r\nactual npm run script `npm run test:e2e` for the Playwright test runner:\r\n\r\n```yaml\r\njobs:\r\n  tests_e2e:\r\n    name: Run end-to-end tests\r\n    runs-on: ubuntu-latest\r\n    steps:\r\n      - uses: actions/checkout@v3\r\n      - uses: actions/setup-node@v3\r\n      - name: Install dependencies\r\n        run: npm ci\r\n      - name: Install playwright browsers\r\n        run: npx playwright install --with-deps\r\n      - name: Run tests\r\n        run: npx playwright test\r\n```\r\n\r\nIf something doesn't work, please [let us know](https://github.com/microsoft/playwright/issues/new)! \r\n\r\n\r\n\u003cdetails\u003e\r\n \u003csummary\u003e\r\n  ⚠️ GitHub Action Usage (deprecated)\r\n \u003c/summary\u003e\r\n\r\nAdd `uses: microsoft/playwright-github-action@v1` to the GitHub workflow definition before running your tests.\r\n\r\n```yml\r\non:\r\n  push:\r\n    branches:\r\n    - main\r\n\r\njobs:\r\n  e2e-tests:\r\n    runs-on: ubuntu-latest # or macos-latest, windows-latest\r\n\r\n    steps:\r\n      - uses: actions/checkout@v2\r\n\r\n      - uses: actions/setup-node@v1\r\n\r\n      - uses: microsoft/playwright-github-action@v1\r\n\r\n      - name: Install dependencies and run tests\r\n        run: npm install \u0026\u0026 npm test\r\n```\r\n\r\n### Upload artifacts\r\n\r\nThis GitHub Action can be combined with the [Upload Artifact action](https://github.com/actions/upload-artifact) to upload test artifacts (like screenshots or logs).\r\n\r\n```yml\r\nsteps:\r\n- uses: microsoft/playwright-github-action@v1\r\n\r\n- name: Install dependencies and run tests\r\n  run: npm install \u0026\u0026 npm test\r\n\r\n- uses: actions/upload-artifact@v2\r\n  if: ${{ always() }}\r\n  with:\r\n    name: test-artifacts\r\n    path: path/to/artifacts\r\n```\r\n\r\n### Run in headful mode\r\n\r\nThis GitHub Action can also execute tests in headful mode. To do this, use `xvfb-run` on a Linux agent.\r\n\r\n```sh\r\n# Windows/macOS\r\nnpm test\r\n\r\n# Linux\r\nxvfb-run --auto-servernum -- npm test\r\n```\r\n\r\n\u003c/details\u003e\r\n \r\n \r\n## Resources\r\n\r\n* [Get started with Playwright](https://github.com/microsoft/playwright)\r\n* [Playwright API reference](https://playwright.dev/docs/api/class-playwright/)\r\n* [Development docs](DEVELOPMENT.md)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fplaywright-github-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Fplaywright-github-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fplaywright-github-action/lists"}