🤖 fix: make image delete button visible #3838
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: ["**"] | |
| merge_group: | |
| workflow_dispatch: | |
| inputs: | |
| test_filter: | |
| description: 'Optional test filter (e.g., "workspace", "tests/file.test.ts", or "-t pattern")' | |
| required: false | |
| type: string | |
| # This filter is passed to unit tests, integration tests, e2e tests, and storybook tests | |
| # to enable faster iteration when debugging specific test failures in CI | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| static-check: | |
| name: Static Checks (lint + typecheck + fmt) | |
| runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required for git describe to find tags | |
| - uses: ./.github/actions/setup-cmux | |
| - name: Generate version file | |
| run: ./scripts/generate-version.sh | |
| - name: Cache shfmt | |
| id: cache-shfmt | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.local/bin/shfmt | |
| # We install latest via webinstall; reflect that in the cache key to avoid pinning mismatches | |
| key: ${{ runner.os }}-shfmt-latest | |
| restore-keys: | | |
| ${{ runner.os }}-shfmt- | |
| - name: Install and setup shfmt | |
| run: | | |
| # Install shfmt if not cached or if cached binary is broken | |
| if [[ ! -f "$HOME/.local/bin/shfmt" ]] || ! "$HOME/.local/bin/shfmt" --version >/dev/null 2>&1; then | |
| curl -sS https://webinstall.dev/shfmt | bash | |
| fi | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| # Verify shfmt is available | |
| "$HOME/.local/bin/shfmt" --version | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v27 | |
| with: | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| - name: Install uv | |
| run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
| - name: Add uv to PATH | |
| run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Run static checks | |
| run: make -j3 static-check | |
| test: | |
| name: Unit Tests | |
| runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required for git describe to find tags | |
| - uses: ./.github/actions/setup-cmux | |
| - name: Build worker files | |
| run: make build-main | |
| - name: Run tests with coverage | |
| run: bun test --coverage --coverage-reporter=lcov ${{ github.event.inputs.test_filter || 'src' }} | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage/lcov.info | |
| flags: unit-tests | |
| fail_ci_if_error: false | |
| integration-test: | |
| name: Integration Tests | |
| runs-on: ${{ github.repository_owner == 'coder' && 'self-hosted' || 'ubuntu-latest' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required for git describe to find tags | |
| - uses: ./.github/actions/setup-cmux | |
| - name: Check if Ollama is pre-installed | |
| id: check-ollama | |
| run: | | |
| if systemctl is-active --quiet ollama 2>/dev/null && curl -sf http://localhost:11434/api/tags > /dev/null 2>&1; then | |
| echo "installed=true" >> $GITHUB_OUTPUT | |
| echo "✅ Ollama already running (self-hosted runner)" | |
| else | |
| echo "installed=false" >> $GITHUB_OUTPUT | |
| echo "⚙️ Ollama not found, will install" | |
| fi | |
| - name: Setup Ollama | |
| # Only install Ollama if not already running (self-hosted runners have it pre-installed) | |
| if: steps.check-ollama.outputs.installed != 'true' | |
| uses: ./.github/actions/setup-ollama | |
| # Ollama server started by setup-ollama action or pre-installed on self-hosted | |
| # Tests will pull models idempotently | |
| - name: Verify Ollama server | |
| run: | | |
| echo "Verifying Ollama server..." | |
| timeout 5 sh -c 'until curl -sf http://localhost:11434/api/tags > /dev/null 2>&1; do sleep 0.2; done' | |
| echo "Ollama ready - integration tests will pull models on demand" | |
| - name: Build worker files | |
| run: make build-main | |
| - name: Run all integration tests with coverage | |
| # TEST_OLLAMA=1 enables Ollama-specific tests (now included with all integration tests) | |
| # --silent suppresses per-test output (17+ test files × workers = overwhelming logs) | |
| run: TEST_INTEGRATION=1 TEST_OLLAMA=1 bun x jest --coverage --maxWorkers=100% --silent ${{ github.event.inputs.test_filter || 'tests' }} | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| OLLAMA_BASE_URL: http://localhost:11434/api | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage/lcov.info | |
| flags: integration-tests | |
| fail_ci_if_error: false | |
| storybook-test: | |
| name: Storybook Interaction Tests | |
| runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }} | |
| if: github.event.inputs.test_filter == '' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required for git describe to find tags | |
| - uses: ./.github/actions/setup-cmux | |
| - name: Install Playwright browsers | |
| run: bun x playwright install --with-deps | |
| - name: Build Storybook | |
| run: make storybook-build | |
| - name: Serve Storybook | |
| run: | | |
| bun x http-server storybook-static -p 6006 & | |
| sleep 5 | |
| - name: Run Storybook tests | |
| run: make test-storybook | |
| e2e-test: | |
| name: End-to-End Tests | |
| runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }} | |
| if: github.event.inputs.test_filter == '' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required for git describe to find tags | |
| - uses: ./.github/actions/setup-cmux | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y xvfb | |
| - name: Install Playwright runtime dependencies | |
| run: bun x playwright install-deps | |
| - name: Install Playwright browsers | |
| run: bun x playwright install --with-deps | |
| - name: Run e2e tests | |
| run: xvfb-run -a make test-e2e | |
| env: | |
| ELECTRON_DISABLE_SANDBOX: 1 | |
| check-codex-comments: | |
| name: Check Codex Comments | |
| runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }} | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required for git describe to find tags | |
| - name: Check for unresolved Codex comments | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| ./scripts/check_codex_comments.sh ${{ github.event.pull_request.number }} | |
| # Trigger CI run |