About this tool
Most test suites need the same CI skeleton: check out the code, install a runtime, install dependencies and browsers, run the tests and keep the report when something fails. This generator writes that workflow for Playwright (TypeScript), Cypress, Selenium with Java and Maven, or pytest, using current major versions of the official actions (checkout@v4, setup-node@v4, setup-java@v4, setup-python@v5, cache@v4, upload-artifact@v4). For Playwright it can shard the suite across parallel jobs with --shard=i/n, then merge the blob reports into one HTML report, following Playwright’s documented pattern. Scheduled runs use 5-field cron in UTC, as GitHub Actions requires.
How to use it
- Pick your framework and runtime version, then choose the triggers: push, pull_request, a cron schedule or manual workflow_dispatch.
- Select browsers and, for Playwright, a shard count. Keep caching and report upload on unless you have a reason not to.
- Copy the YAML or download it, save it under .github/workflows/ in your repository, and check that commands such as npm ci or pip install -r requirements.txt match your project.
GitHub Actions Workflow Generator for Tests FAQ
Why does the schedule run at a different hour from what I expected?
GitHub Actions evaluates cron in UTC, so convert from your local time zone. Scheduled runs can also start late during busy periods, and in public repositories scheduled workflows are disabled automatically after 60 days without repository activity.
How does Playwright sharding work here?
A matrix starts one job per shard and each runs npx playwright test --shard=i/n with the blob reporter. A follow-up job downloads every blob report and runs npx playwright merge-reports to produce a single HTML report artifact.
Why is there a --project flag for each browser?
Playwright selects browsers through projects defined in playwright.config.ts. The generated command passes --project=<name> for each selected browser, so those project names must exist in your config. Remove the flag to run every project.
Where do I put credentials such as a test user password?
Store them as repository or environment secrets and reference them with ${{ secrets.NAME }} in an env block. Never commit them in the workflow file.