Docs
CI/CD Integration
CI/CD Integration
Run Fume‑generated Playwright tests in GitHub Actions, GitLab, or your own CI.
You can run tests on Fume Cloud or on your own CI. You can find your API keys in your Fume dashboard at app.fumedev.com. Below are example setups.
GitHub Actions
Create .github/workflows/fume.yml
:
name: Fume E2E
on:
workflow_dispatch: {}
push:
branches: [main]
jobs:
e2e:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
FUME_API_KEY: ${{ secrets.FUME_API_KEY }}
PROJECT_ID: proj_123
BRANCH: ${{ github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Playwright
run: |
npm i -g playwright@^1
npx playwright install --with-deps
- name: Trigger Fume run
shell: bash
run: |
curl -X POST \
-H "Authorization: $FUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{"projectId":"'$PROJECT_ID'","branch":"'$BRANCH'"}' \
https://api.fumedev.com/test/trigger
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: e2e/playwright-report
GitLab CI
Add .gitlab-ci.yml
:
stages:
- e2e
variables:
NODE_ENV: production
PLAYWRIGHT_BROWSERS_PATH: /cache/ms-playwright
PROJECT_ID: proj_123
BRANCH: $CI_COMMIT_REF_NAME
cache:
paths:
- node_modules/
- /cache/ms-playwright
e2e:
stage: e2e
image: mcr.microsoft.com/playwright:v1.45.0-jammy
timeout: 30m
script:
- npm ci || npm i
- npx playwright install --with-deps
- |
curl -X POST \
-H "Authorization: $FUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{"projectId":"'"$PROJECT_ID"'","branch":"'"$BRANCH"'"}' \
https://api.fumedev.com/test/trigger
CircleCI
Set FUME_API_KEY
in CircleCI Project Settings → Environment Variables (or via a Context). Then add .circleci/config.yml
:
version: 2.1
jobs:
e2e:
docker:
- image: mcr.microsoft.com/playwright:v1.45.0-jammy
environment:
PROJECT_ID: proj_123
BRANCH: << pipeline.git.branch >>
steps:
- checkout
- run:
name: Install dependencies and browsers
command: |
npm ci || npm i
npx playwright install --with-deps
- run:
name: Trigger Fume run
command: |
curl -X POST \
-H "Authorization: $FUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{"projectId":"'"$PROJECT_ID"'","branch":"'"$BRANCH"'"}' \
https://api.fumedev.com/test/trigger
workflows:
fume:
jobs:
- e2e
Custom CI
Use the API to trigger a run from any CI system.
export FUME_API_KEY=*** # from your dashboard at https://app.fumedev.com
PROJECT_ID=proj_123
BRANCH=$(git rev-parse --abbrev-ref HEAD)
curl -X POST \
-H "Authorization: $FUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{"projectId":"'$PROJECT_ID'","branch":"'$BRANCH'"}' \
https://api.fumedev.com/test/trigger