Time to get your hands dirty. These exercises take you from zero to a production-ready CI pipeline. Do them in order -- each builds on the previous one.
Exercise 1: Basic GitHub Actions Pipeline
Create a new GitHub repository with a simple Playwright project
Add playwright.config.ts with CI-specific settings (retries, workers, forbidOnly)
Create .github/workflows/playwright.yml with checkout, setup, install, run, and artifact upload
Push and verify the workflow runs successfully on GitHub Actions
Download the HTML report artifact and view it locally
Exercise 2: Add Sharding
Create at least 4 test files with 3+ tests each
Modify the workflow to use matrix strategy with 4 shards
Add the blob reporter to playwright.config.ts
Add a merge-reports job that combines shard results into one HTML report
Set fail-fast: false and verify all shards complete even if one fails
Exercise 3: Docker Setup
Write a Dockerfile.tests using the official Playwright image
Run your tests inside the Docker container using docker run
Create a docker-compose.test.yml with your app and Playwright containers
Use wait-on to ensure the app is ready before tests run
Verify tests pass in Docker with the same results as locally
Exercise 4: Debug a CI Failure
Intentionally break a test (wrong selector, impossible assertion)
Push the change and let CI fail
Download the HTML report and trace artifacts
Use npx playwright show-trace to inspect the failure
Identify the exact line and DOM state where the test failed
Fix the test and push again -- verify CI passes
Exercise 5: Complete CI Pipeline
Combine everything into a production-ready pipeline.
GitHub Actions workflow with 4 shards and report merging
Browser caching to speed up runs
Schedule trigger for nightly runs
HTML report + trace artifacts with correct retention days
CI-specific playwright.config.ts with retries, workers, forbidOnly, reporters
All tests should pass consistently across 3 consecutive runs
For exercises 1-4, use a public GitHub repository. You get unlimited free CI minutes on public repos. For private repos, you get 2,000 minutes/month on the free tier.
Key Point: Practice is the only way to learn CI/CD. Set up a real pipeline, break it intentionally, debug it, fix it. That muscle memory is what separates good QA engineers from great ones.
Key Point: Set up a real CI pipeline, add sharding, break tests intentionally, debug with traces. Practice with a public GitHub repo for free CI minutes.