Skip to content

GitHub Actions

GitHub-hosted Windows runners provide an interactive session, so start with plain pytest.

Minimal Workflow

.github/workflows/tests.yml
name: Desktop Tests

on:
  push:
    branches: [main]
  pull_request:

jobs:
  test:
    runs-on: windows-latest

    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - name: Install
        run: pip install dolphin-desktop pytest

      - name: Check Dolphin environment
        run: dolphin doctor

      - name: Run tests
        run: pytest tests/ -v --dolphin-backend=uia

Upload Failure Artifacts

      - name: Install
        run: pip install "dolphin-desktop[video]" pytest

      - name: Run tests
        env:
          DOLPHIN_TRACE: on-failure
          DOLPHIN_VIDEO: keepfailedonly
        run: pytest tests/ -v --dolphin-screenshot-on-fail

      - name: Upload traces
        if: failure()
        uses: actions/upload-artifact@v4
        with:
          name: dolphin-traces
          path: dolphin-traces/
          if-no-files-found: ignore

      - name: Upload videos
        if: failure()
        uses: actions/upload-artifact@v4
        with:
          name: dolphin-videos
          path: dolphin-videos/
          if-no-files-found: ignore

      - name: Upload screenshots
        if: failure()
        uses: actions/upload-artifact@v4
        with:
          name: dolphin-screenshots
          path: dolphin-screenshots/
          if-no-files-found: ignore

Headless Smoke Job

Use dolphin-run only for tests you have verified on a hidden desktop:

  smoke-headless:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.11"
      - run: pip install dolphin-desktop pytest
      - run: dolphin-run pytest tests/smoke/ -v --dolphin-backend=uia

Read Headless Mode before moving a full suite to dolphin-run.