Travis CI โ
Run your Shiplight E2E tests in Travis CI and upload the results to Shiplight Cloud. Travis 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 repository environment variable named
SHIPLIGHT_API_TOKEN(Settings โ Environment Variables; keep "Display value in build log" off).
Pipeline โ
Create .travis.yml at your repository root:
yaml
language: node_js
node_js:
- "20"
addons:
apt:
packages:
- libnss3
- libatk-bridge2.0-0
- libgtk-3-0
env:
global:
- SHIPLIGHT_REPORT_TO_CLOUD=1
# Set SHIPLIGHT_API_TOKEN in the Travis repo settings, not here.
install:
- npm install
- npx playwright install --with-deps chromium
script:
- npx shiplight test
after_script:
- npx shiplight report # after_script runs regardless of the build resultNotes โ
SHIPLIGHT_API_TOKENandSHIPLIGHT_REPORT_TO_CLOUD=1are required on every non-Shiplight runner โ they are provided automatically only on Shiplight-hosted GitHub runners.- Install Chromium yourself.
--with-depspulls most system libraries; theaptaddon above covers the rest on Travis's Ubuntu images. after_scriptruns whether or notscriptpassed, so the upload survives a red run. (Note that a failure insideafter_scriptdoes not fail the build.)- Not available on Travis CI: Shiplight-hosted runners, the self-healing action cache, automatic LLM credentials, and auto-triage โ those are GitHub Actions only.
- Project in a subdirectory (e.g.
tests/e2e)?cd tests/e2eat the start of each phase, or setbefore_install: cd tests/e2e.