# Travis CI

<div class="view-markdown-wrapper">
<ViewMarkdown />
</div>

Run your Shiplight E2E tests in Travis CI and upload the results to [Shiplight Cloud](https://app.shiplight.ai). 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](/local/ci) for how the pieces fit together.
- An org API token from [app.shiplight.ai/api-tokens](https://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:
  - "22"

addons:
  apt:
    packages:
      - libnss3
      - libatk-bridge2.0-0
      - libgtk-3-0

env:
  global:
    - CI=true
    # Set SHIPLIGHT_API_TOKEN in the Travis repo settings, not here.

install:
  - curl -fsSL https://bun.sh/install | bash
  - export PATH="$HOME/.bun/bin:$PATH"
  - bun install
  - bun run playwright install --with-deps chromium

script:
  - bun run shiplight test

```

## Notes

- `SHIPLIGHT_API_TOKEN` enables completed test report uploads; set it as a CI secret.
- `CI=true` plus `SHIPLIGHT_API_TOKEN` enables the shared Shiplight Cloud action cache. AI-powered actions can self-heal through the Shiplight LLM proxy, and healed locators from passing tests are reused by later runs.
- Install Chromium yourself. `--with-deps` pulls most system libraries; the `apt` addon above covers the rest on Travis's Ubuntu images.
- **Failure triage on Travis CI:** classification runs on the server for uploaded runs from any provider, but the optional autofix workflow ([auto-triage](/local/ci#auto-triage-failures)) is 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`.

## Related

- [CI/CD overview](/local/ci) · [Custom setups](/local/ci/custom) · [CLI Reference](/local/cli-reference)
