# Depot CI

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

Run your Shiplight E2E tests in Depot CI and upload the results to [Shiplight Cloud](https://app.shiplight.ai). Depot CI runs GitHub Actions-compatible workflows on Depot's own compute, so the workflow uses familiar actions and expressions but lives under `.depot/workflows/`.

::: info Depot CI or Depot GitHub Actions Runners?
This page covers **Depot CI**, where Depot schedules and executes the workflow. If you use Depot only as a runner for a workflow that remains in GitHub Actions, follow the [GitHub Actions guide](/local/ci/github-actions) and select the appropriate Depot runner label instead.
:::

## Before you start

- A scaffolded Shiplight test project (`/shiplight init`). See the [CI/CD overview](/local/ci) for how the pieces fit together.
- A Depot organization with your GitHub repository connected through the Depot Code Access GitHub App. Follow the [Depot CI quickstart](https://depot.dev/docs/ci/quickstart) if the repository is not connected yet.
- An org API token from [app.shiplight.ai/api-tokens](https://app.shiplight.ai/api-tokens), stored as a Depot CI **secret** named `SHIPLIGHT_API_TOKEN`. The token must be configured in Depot CI Secrets; a GitHub secret or a secret in another Depot product is not automatically available. See [Manage secrets and variables](https://depot.dev/docs/ci/how-to-guides/manage-secrets-and-variables).

## Workflow

Create `.depot/workflows/e2e.yml` in your repository:

```yaml
name: Shiplight E2E

on:
  push:
    branches: [main]
  pull_request:

jobs:
  e2e:
    runs-on: depot-ubuntu-24.04
    timeout-minutes: 30
    env:
      CI: "true"
      SHIPLIGHT_API_TOKEN: ${{ secrets.SHIPLIGHT_API_TOKEN }}

    steps:
      - uses: actions/checkout@v5

      - name: Set up Node.js
        uses: actions/setup-node@v6
        with:
          node-version: "22"

      - name: Install dependencies
        run: npm install

      - name: Install Playwright browser
        run: npx playwright install --with-deps chromium

      - name: Run E2E tests
        run: npx shiplight test

      - name: Upload results to Shiplight
        if: always()
        env:
          SHIPLIGHT_REPORT_TO_CLOUD: "1"
        run: npx shiplight report
```

Merge the workflow into the repository's default branch so Depot can register its automatic triggers. Pushes to `main` and pull requests will then run the Shiplight job on Depot CI.

## Notes

- `SHIPLIGHT_API_TOKEN` authenticates the report upload and any AI-powered test actions. `SHIPLIGHT_REPORT_TO_CLOUD=1` enables the upload on this non-Shiplight runner.
- `CI=true` plus `SHIPLIGHT_API_TOKEN` enables the provider-independent Shiplight Cloud action cache. Healed locators from passing tests persist for later runs of the same test path and branch.
- `if: always()` makes the report step run after a failed test, so a red workflow still produces screenshots, videos, and traces in Shiplight Cloud.
- Install Chromium with its Linux dependencies so the browser version matches the Playwright version required by your project.
- If your Shiplight project is in a subdirectory such as `tests/e2e`, add `working-directory: tests/e2e` to each `run` step.
- If you already have a GitHub Actions workflow, `depot ci migrate` can copy and check it for Depot CI compatibility. Make sure `SHIPLIGHT_API_TOKEN` is also available as a Depot CI secret before running the migrated workflow.
- **Not available on Depot CI:** Shiplight-hosted runners and [auto-triage](/local/ci/github-actions#auto-triage-ci-failures-optional). Those capabilities are tied to GitHub Actions.
- `/shiplight ci` currently creates a GitHub Actions workflow. Use the template on this page for Depot CI.

## Related

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