What is CI · GitHub Actions · Workflow file structure · Running Playwright in the cloud
→ next slide | ESC overview
1. What is CI and why it matters
2. GitHub Actions — how it works
3. Workflow file structure
4. Each step explained
5. Reading results and downloading the report
.github/workflows/playwright.yml file so your tests run automatically on every push and PR. Paste the link to a passing run in your PR description.CI — Continuous Integration — means every code change automatically triggers a build and test run in the cloud.
main. The next person pulls a broken branch.
CI does not replace local testing — it is the safety net that catches what slips through.
.yml file inside .github/workflows/ becomes a workflow. No registration needed — just push the file.
# TODO comments. Your job is to fill in the blanks — each TODO explains exactly what to add.
name: Playwright E2E Tests
on: # when to run
push:
branches: [main]
pull_request:
branches: [main]
jobs:
e2e:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- # ... more steps
main and on every PR targeting main.
on:
push:
branches: [main]
pull_request:
branches: [main]
main. Catches anything merged in.
main. This is where the green/red check appears on the PR page — before anyone merges.
Both triggers together mean: tests always run, whether you push directly or open a PR.
jobs:
e2e:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
# 1 — check out your code
- uses: actions/checkout@v4
# 2 — set up Node.js
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
# 3 — install npm packages
- name: Install dependencies
run: npm ci
# 4 — install Playwright + browser
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
npm install but reads package-lock.json exactly — reproducible installs, no version drift.
# 5 — run all tests
- name: Run Playwright tests
run: npx playwright test
# 6 — upload the HTML report
- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
retention-days: 14
playwright.config.ts. The step fails if any test fails, which marks the whole job red.
always() forces it to run regardless.
playwright-report. Unzip and open index.html.
Complete the scaffolded workflow file so your Playwright tests run automatically in the cloud.
mainubuntu-latest, timeout 15 minnpm cinpx playwright install --with-deps chromiumnpx playwright testif: always(), 14 daysplaywright.yml to your forktanjaq/playwright-kriso
The scaffold file is at .github/workflows/playwright.yml — each step has a # TODO comment explaining what to add.