Sveltejs Academy · Lesson

CI Integration

Run Playwright tests in GitHub Actions or another CI provider on every push.

Lesson 4 of 413 steps

CI Integration is a free Sveltejs Academy lesson on CoddyKit. This is 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, and your progress syncs across the web and the CoddyKit app. The Sveltejs Academy course includes 4 lessons in total.

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:e2e

Caching

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 : 0

Slow 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.

Free to start

Learn HTML with an AI tutor — free

Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.

Courses
41
Lessons
163

Frequently Asked Questions

Is the “CI Integration” lesson free?

Yes — the full text of “CI Integration” is free to read here on the web. 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. The Sveltejs Academy course includes 4 lessons in total.

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, so you can start here or from the beginning and move at your own pace. This is lesson 4 of 4.

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.

All lessons in this course

  1. Playwright Setup in SvelteKit
  2. Writing Page Interaction Tests
  3. Testing Forms and Navigation
  4. CI Integration
← Back to Sveltejs Academy