fix: skill builder ctrl+i keybind, ESC navigation, docs screenshots (… #1019
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: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # --------------------------------------------------------------------------- | |
| # Detect which areas of the codebase changed to skip unaffected jobs. | |
| # On push to main, all jobs run unconditionally (safety net). | |
| # --------------------------------------------------------------------------- | |
| changes: | |
| name: Detect Changes | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 2 | |
| outputs: | |
| typescript: ${{ steps.filter.outputs.typescript }} | |
| drivers: ${{ steps.filter.outputs.drivers }} | |
| dbt-tools: ${{ steps.filter.outputs.dbt-tools }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3 | |
| id: filter | |
| with: | |
| filters: | | |
| typescript: | |
| - 'packages/opencode/**' | |
| - 'packages/drivers/**' | |
| - 'packages/plugin/**' | |
| - 'packages/sdk/**' | |
| - 'packages/util/**' | |
| - 'packages/script/**' | |
| - 'bun.lock' | |
| - 'package.json' | |
| - 'tsconfig.json' | |
| drivers: | |
| - 'packages/drivers/src/**' | |
| - 'packages/opencode/src/altimate/native/connections/**' | |
| - 'packages/opencode/test/altimate/drivers-e2e.test.ts' | |
| - 'packages/opencode/test/altimate/drivers-docker-e2e.test.ts' | |
| - 'packages/opencode/test/altimate/connections.test.ts' | |
| dbt-tools: | |
| - 'packages/dbt-tools/**' | |
| # --------------------------------------------------------------------------- | |
| # Main TypeScript tests — excludes driver E2E tests (separate job) and | |
| # cloud credential tests (local-only). | |
| # --------------------------------------------------------------------------- | |
| typescript: | |
| name: TypeScript | |
| needs: changes | |
| if: needs.changes.outputs.typescript == 'true' || github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2 | |
| with: | |
| bun-version: "1.3.10" | |
| - name: Cache Bun dependencies | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }} | |
| restore-keys: | | |
| bun-${{ runner.os }}- | |
| - name: Configure git for tests | |
| run: | | |
| git config --global user.name "CI" | |
| git config --global user.email "ci@test.local" | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run tests | |
| run: bun test | |
| working-directory: packages/opencode | |
| # Cloud E2E tests (Snowflake, BigQuery, Databricks) auto-skip when | |
| # ALTIMATE_CODE_CONN_* env vars are not set. Docker E2E tests auto-skip | |
| # when Docker is not available. No exclusion needed — skipIf handles it. | |
| # --------------------------------------------------------------------------- | |
| # Driver E2E tests — only when driver code changes. | |
| # Uses GitHub Actions services (no Docker-in-Docker). | |
| # Cloud tests (Snowflake, BigQuery, Databricks) are NOT run here — | |
| # they require real credentials and are run locally only. | |
| # --------------------------------------------------------------------------- | |
| driver-e2e: | |
| name: Driver E2E | |
| needs: changes | |
| if: needs.changes.outputs.drivers == 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| services: | |
| postgres: | |
| image: postgres:16-alpine | |
| env: | |
| POSTGRES_PASSWORD: testpass123 | |
| ports: | |
| - 15432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_ROOT_PASSWORD: testpass123 | |
| MYSQL_DATABASE: testdb | |
| ports: | |
| - 13306:3306 | |
| options: >- | |
| --health-cmd "mysqladmin ping -h 127.0.0.1" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 20 | |
| mssql: | |
| image: mcr.microsoft.com/azure-sql-edge:latest | |
| env: | |
| ACCEPT_EULA: Y | |
| MSSQL_SA_PASSWORD: TestPass123! | |
| ports: | |
| - 11433:1433 | |
| options: >- | |
| --health-cmd "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'TestPass123!' -Q 'SELECT 1' || exit 1" | |
| --health-interval 10s | |
| --health-timeout 10s | |
| --health-retries 20 | |
| redshift: | |
| image: postgres:16-alpine | |
| env: | |
| POSTGRES_PASSWORD: testpass123 | |
| POSTGRES_DB: dev | |
| ports: | |
| - 15439:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2 | |
| with: | |
| bun-version: "1.3.10" | |
| - name: Cache Bun dependencies | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }} | |
| restore-keys: | | |
| bun-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run local driver E2E (DuckDB, SQLite, PostgreSQL) | |
| run: bun test test/altimate/drivers-e2e.test.ts | |
| working-directory: packages/opencode | |
| env: | |
| TEST_PG_HOST: 127.0.0.1 | |
| TEST_PG_PORT: "15432" | |
| TEST_PG_PASSWORD: testpass123 | |
| - name: Run Docker driver E2E (MySQL, SQL Server, Redshift) | |
| run: bun test test/altimate/drivers-docker-e2e.test.ts | |
| working-directory: packages/opencode | |
| env: | |
| TEST_MYSQL_HOST: 127.0.0.1 | |
| TEST_MYSQL_PORT: "13306" | |
| TEST_MYSQL_PASSWORD: testpass123 | |
| TEST_MSSQL_HOST: 127.0.0.1 | |
| TEST_MSSQL_PORT: "11433" | |
| TEST_MSSQL_PASSWORD: "TestPass123!" | |
| TEST_REDSHIFT_HOST: 127.0.0.1 | |
| TEST_REDSHIFT_PORT: "15439" | |
| TEST_REDSHIFT_PASSWORD: testpass123 | |
| # Cloud tests NOT included — they require real credentials | |
| # Run locally with: | |
| # ALTIMATE_CODE_CONN_SNOWFLAKE_TEST='...' bun test test/altimate/drivers-snowflake-e2e.test.ts | |
| # ALTIMATE_CODE_CONN_BIGQUERY_TEST='...' bun test test/altimate/drivers-bigquery-e2e.test.ts | |
| # ALTIMATE_CODE_CONN_DATABRICKS_TEST='...' bun test test/altimate/drivers-databricks-e2e.test.ts | |
| # --------------------------------------------------------------------------- | |
| # dbt-tools unit tests — fast (< 5s), run on PRs when dbt-tools changes. | |
| # --------------------------------------------------------------------------- | |
| dbt-tools: | |
| name: dbt-tools | |
| needs: changes | |
| if: needs.changes.outputs.dbt-tools == 'true' || github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2 | |
| with: | |
| bun-version: "1.3.10" | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run dbt-tools unit tests | |
| run: bun run test | |
| working-directory: packages/dbt-tools | |
| # --------------------------------------------------------------------------- | |
| # dbt-tools E2E — slow (~3 min), only on push to main. | |
| # Tests dbt CLI fallbacks against real dbt versions (1.8, 1.10, 1.11) and | |
| # real Python environments (venv, uv, system). | |
| # --------------------------------------------------------------------------- | |
| dbt-tools-e2e: | |
| name: "dbt-tools E2E" | |
| needs: changes | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2 | |
| with: | |
| bun-version: "1.3.10" | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install uv | |
| run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Cache dbt venvs | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: packages/dbt-tools/test/.dbt-venvs | |
| key: dbt-venvs-${{ runner.os }}-1.8-1.10-1.11 | |
| - name: Cache Python env scenarios | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: packages/dbt-tools/test/.dbt-resolve-envs | |
| key: dbt-resolve-envs-${{ runner.os }}-v1 | |
| - name: Set up dbt versions | |
| run: ./test/e2e/setup-versions.sh 1.8 1.10 1.11 | |
| working-directory: packages/dbt-tools | |
| - name: Set up Python env scenarios | |
| run: ./test/e2e/setup-resolve.sh venv uv system | |
| working-directory: packages/dbt-tools | |
| - name: Run dbt-tools E2E tests | |
| run: bun run test:e2e | |
| working-directory: packages/dbt-tools | |
| env: | |
| DBT_E2E_VERSIONS: "1.8,1.10,1.11" | |
| DBT_RESOLVE_SCENARIOS: "venv,uv,system" | |
| marker-guard: | |
| name: Marker Guard | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2 | |
| with: | |
| bun-version: "1.3.10" | |
| - name: Add upstream remote | |
| run: | | |
| git remote add upstream https://github.com/anomalyco/opencode.git || true | |
| git fetch upstream --quiet --no-tags | |
| - name: Install merge tooling deps | |
| run: bun install | |
| working-directory: script/upstream | |
| - name: Run marker parser tests | |
| run: bun test | |
| working-directory: script/upstream | |
| - name: Check for missing altimate_change markers | |
| run: | | |
| if [[ "${{ github.event_name }}" == "push" ]]; then | |
| if [[ "${{ github.event.before }}" == "0000000000000000000000000000000000000000" ]]; then | |
| echo "Initial push (zero-SHA) — skipping marker check" | |
| exit 0 | |
| fi | |
| echo "Push to main — running marker check against pre-push state" | |
| bun run script/upstream/analyze.ts --markers --base "${{ github.event.before }}" --strict | |
| elif [[ "${{ github.head_ref }}" == merge-upstream-* ]] || [[ "${{ github.head_ref }}" == upstream/merge-* ]]; then | |
| echo "Upstream merge PR detected — running marker check in non-strict mode" | |
| bun run script/upstream/analyze.ts --markers --base ${{ github.event.pull_request.base.ref }} | |
| else | |
| bun run script/upstream/analyze.ts --markers --base ${{ github.event.pull_request.base.ref }} --strict | |
| fi |