Skip to content

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 result

Notes โ€‹

  • SHIPLIGHT_API_TOKEN and SHIPLIGHT_REPORT_TO_CLOUD=1 are required on every non-Shiplight runner โ€” they are provided automatically only on Shiplight-hosted GitHub runners.
  • Install Chromium yourself. --with-deps pulls most system libraries; the apt addon above covers the rest on Travis's Ubuntu images.
  • after_script runs whether or not script passed, so the upload survives a red run. (Note that a failure inside after_script does 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/e2e at the start of each phase, or set before_install: cd tests/e2e.

Released under the MIT License.