GitLab CI โ
Run your Shiplight E2E tests in GitLab CI and upload the results to Shiplight Cloud. GitLab uses the same shiplight CLI as every other provider โ only the pipeline syntax differs.
Before you start โ
- A scaffolded Shiplight test project (
/shiplight init). See the CI/CD overview for how the pieces fit together. - An org API token from app.shiplight.ai/api-tokens, stored as a masked CI/CD variable named
SHIPLIGHT_API_TOKEN(Settings โ CI/CD โ Variables). GitLab injects it into the job automatically.
Pipeline โ
Create .gitlab-ci.yml at your repository root:
yaml
e2e:
image: node:22
variables:
# SHIPLIGHT_API_TOKEN comes from a masked CI/CD variable โ no need to repeat it here.
before_script:
- curl -fsSL https://bun.sh/install | bash
- export PATH="$HOME/.bun/bin:$PATH"
script:
- bun install
- bun run playwright install --with-deps chromium
- bun run shiplight testNotes โ
SHIPLIGHT_API_TOKENenables completed test report uploads; set it as a CI secret.- With
SHIPLIGHT_API_TOKENset, AI-powered actions (natural-language steps, self-healing locators) run through the Shiplight LLM proxy, and healed locators persist to the Shiplight Cloud action cache so later runs replay at full speed. - Install Chromium yourself (
bun run playwright install --with-deps chromium); no stock image ships it. - Failure triage on GitLab: classification runs on the server for uploaded runs from any provider, but the optional autofix workflow (auto-triage) is GitHub Actions only.
- Project in a subdirectory (e.g.
tests/e2e)? Addcd tests/e2eafter the Bun setup commands in this job'sbefore_script.