Why this matters
Automated tests are most valuable when they run without anyone remembering to start them. Teams connect tests to a pipeline, a process that runs on a server every time someone pushes code. A few adverts and the occupation frameworks we read mention CI/CD and tools such as Jenkins or GitHub Actions. This lesson is optional, but setting it up for your own project is a strong portfolio signal.
What CI means
CI stands for continuous integration: developers merge their changes often, and each change is checked automatically. CD, continuous delivery or deployment, goes further and releases changes that pass. A pipeline usually:
- Fetches the latest code.
- Installs what the project needs.
- Runs the tests.
- Reports pass or fail, often blocking the change from being merged if tests fail.
Common tools include GitHub Actions, GitLab CI, Jenkins and Azure Pipelines. They all follow the same idea.
A GitHub Actions example
GitHub Actions is free for public repositories within GitHub's usage limits. You add a file at .github/workflows/tests.yml in your project:
name: tests
on: [push]
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: lts/*
- run: npm ci
- run: npx playwright install --with-deps
- run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/