CI Integration
Run Playwright tests in GitHub Actions or another CI provider on every push.
CI Integration is a free Sveltejs Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Sveltejs Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Run on CI
Run Playwright tests on every push or PR via your CI provider.
GitHub Actions
Use the official Playwright action for setup.
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm ci
- run: npx playwright install --with-deps
- run: npm run test:e2eCaching
Cache ~/.cache/ms-playwright to skip downloading browsers each run.
Parallelism
Playwright parallelizes within a job; you can also shard tests across multiple jobs.
Artifacts
Upload traces, screenshots, and reports on failure for easy debugging.
- uses: actions/upload-artifact@v4
if: always()
with: { name: playwright-report, path: playwright-report/ }Containers
The official Playwright Docker image has all browsers pre-installed.
Headless Only on CI
CI almost always runs headless. Locally use headed for debugging.
Retries
Configure retries for known flaky network-dependent tests.
retries: process.env.CI ? 2 : 0Slow Tests
Mark slow tests with annotations so CI can prioritize.
Reporters
Use HTML, JSON, or JUnit reporters depending on your CI dashboard preferences.
Self-Hosted Runners
For Mac/iOS testing, use self-hosted runners with Safari support.
Quick Check
Why install browsers with --with-deps?
Recap
Run Playwright in CI with caching, parallelism, retries, and artifact uploads for easy debugging.
Frequently asked questions
Is the “CI Integration” lesson free?
Yes — the full text of “CI Integration” is free to read here on the web, and the Sveltejs Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Sveltejs Academy course, upgrade to CoddyKit PRO.
What will I learn in “CI Integration”?
Run Playwright tests in GitHub Actions or another CI provider on every push. You practise Sveltejs Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Sveltejs Academy?
No prior experience is required. Sveltejs Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “CI Integration” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Sveltejs Academy lesson?
Yes. Every Sveltejs Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.