chore: migrate to typescript@7 stable, drop tsgo/native-preview #1024
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] | |
| # `labeled` so adding the `force-ci` label re-triggers the run. | |
| types: [opened, synchronize, reopened, labeled] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| jobs: | |
| detect-changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| # The `force-ci` PR label flips every output to 'true', bypassing the | |
| # paths-filter directory check so the full matrix runs. | |
| core: ${{ steps.force.outputs.all || steps.changes.outputs.core }} | |
| aws: ${{ steps.force.outputs.all || steps.changes.outputs.aws }} | |
| cloudflare: ${{ steps.force.outputs.all || steps.changes.outputs.cloudflare }} | |
| gcp: ${{ steps.force.outputs.all || steps.changes.outputs.gcp }} | |
| neon: ${{ steps.force.outputs.all || steps.changes.outputs.neon }} | |
| planetscale: ${{ steps.force.outputs.all || steps.changes.outputs.planetscale }} | |
| prisma-postgres: ${{ steps.force.outputs.all || steps.changes.outputs.prisma-postgres }} | |
| stripe: ${{ steps.force.outputs.all || steps.changes.outputs.stripe }} | |
| supabase: ${{ steps.force.outputs.all || steps.changes.outputs.supabase }} | |
| posthog: ${{ steps.force.outputs.all || steps.changes.outputs.posthog }} | |
| axiom: ${{ steps.force.outputs.all || steps.changes.outputs.axiom }} | |
| azure: ${{ steps.force.outputs.all || steps.changes.outputs.azure }} | |
| kubernetes: ${{ steps.force.outputs.all || steps.changes.outputs.kubernetes }} | |
| coinbase: ${{ steps.force.outputs.all || steps.changes.outputs.coinbase }} | |
| mongodb-atlas: ${{ steps.force.outputs.all || steps.changes.outputs.mongodb-atlas }} | |
| fly-io: ${{ steps.force.outputs.all || steps.changes.outputs.fly-io }} | |
| turso: ${{ steps.force.outputs.all || steps.changes.outputs.turso }} | |
| typesense: ${{ steps.force.outputs.all || steps.changes.outputs.typesense }} | |
| workos: ${{ steps.force.outputs.all || steps.changes.outputs.workos }} | |
| expo-eas: ${{ steps.force.outputs.all || steps.changes.outputs.expo-eas }} | |
| steps: | |
| - id: force | |
| if: contains(github.event.pull_request.labels.*.name, 'force-ci') | |
| run: echo "all=true" >> "$GITHUB_OUTPUT" | |
| - uses: actions/checkout@v6 | |
| - uses: dorny/paths-filter@v4 | |
| id: changes | |
| with: | |
| filters: | | |
| core: | |
| - 'packages/core/**' | |
| aws: | |
| - 'packages/aws/**' | |
| - 'packages/core/**' | |
| cloudflare: | |
| - 'packages/cloudflare/**' | |
| - 'packages/core/**' | |
| gcp: | |
| - 'packages/gcp/**' | |
| - 'packages/core/**' | |
| neon: | |
| - 'packages/neon/**' | |
| - 'packages/core/**' | |
| planetscale: | |
| - 'packages/planetscale/**' | |
| - 'packages/core/**' | |
| prisma-postgres: | |
| - 'packages/prisma-postgres/**' | |
| - 'packages/core/**' | |
| stripe: | |
| - 'packages/stripe/**' | |
| - 'packages/core/**' | |
| supabase: | |
| - 'packages/supabase/**' | |
| - 'packages/core/**' | |
| workos: | |
| - 'packages/workos/**' | |
| - 'packages/core/**' | |
| posthog: | |
| - 'packages/posthog/**' | |
| - 'packages/core/**' | |
| axiom: | |
| - 'packages/axiom/**' | |
| - 'packages/core/**' | |
| azure: | |
| - 'packages/azure/**' | |
| - 'packages/core/**' | |
| kubernetes: | |
| - 'packages/kubernetes/**' | |
| - 'packages/core/**' | |
| coinbase: | |
| - 'packages/coinbase/**' | |
| - 'packages/core/**' | |
| mongodb-atlas: | |
| - 'packages/mongodb-atlas/**' | |
| - 'packages/core/**' | |
| fly-io: | |
| - 'packages/fly-io/**' | |
| - 'packages/core/**' | |
| turso: | |
| - 'packages/turso/**' | |
| - 'packages/core/**' | |
| typesense: | |
| - 'packages/typesense/**' | |
| - 'packages/core/**' | |
| expo-eas: | |
| - 'packages/expo-eas/**' | |
| - 'packages/core/**' | |
| ci-core: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.core == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run check | |
| working-directory: packages/core | |
| ci-aws: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.aws == 'true' | |
| # aws build is large enough that the default runner hangs; use a larger runner. | |
| runs-on: ubuntu-22-large | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v6 | |
| with: | |
| role-to-assume: arn:aws:iam::391965393224:role/distilled-github-oidc-role | |
| aws-region: us-west-2 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| working-directory: packages/core | |
| - name: Fetch AWS specs submodules | |
| run: | | |
| git submodule update --force --init --recursive --depth=1 specs/api-models-aws | |
| git -C specs/api-models-aws checkout -- . | |
| git submodule update --force --init --recursive --depth=1 specs/aws-sdk-js-v3 | |
| git -C specs/aws-sdk-js-v3 checkout -- . | |
| git submodule update --force --init --recursive --depth=1 specs/smithy | |
| git -C specs/smithy checkout -- . | |
| git submodule update --force --init --recursive --depth=1 specs/smithy-typescript | |
| git -C specs/smithy-typescript checkout -- . | |
| working-directory: packages/aws | |
| - run: bun run check | |
| working-directory: packages/aws | |
| - run: bun run test | |
| working-directory: packages/aws | |
| ci-cloudflare: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.cloudflare == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/cloudflare | |
| - run: bun run test | |
| working-directory: packages/cloudflare | |
| env: | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }} | |
| CLOUDFLARE_API_EMAIL: ${{ secrets.CLOUDFLARE_API_EMAIL }} | |
| CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }} | |
| CLOUDFLARE_ACM_ZONE_ID: ${{ secrets.CLOUDFLARE_ACM_ZONE_ID }} | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| ci-gcp: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.gcp == 'true' | |
| # gcp build is too large for the default runner; use a larger runner. | |
| runs-on: ubuntu-22-large | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/gcp | |
| - run: bun run test | |
| working-directory: packages/gcp | |
| ci-neon: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.neon == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/neon | |
| - run: bun run test | |
| working-directory: packages/neon | |
| env: | |
| NEON_API_KEY: ${{ secrets.NEON_API_KEY }} | |
| ci-planetscale: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.planetscale == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/planetscale | |
| - run: bun run test | |
| working-directory: packages/planetscale | |
| env: | |
| PLANETSCALE_API_TOKEN_ID: ${{ secrets.PLANETSCALE_API_TOKEN_ID }} | |
| PLANETSCALE_API_TOKEN: ${{ secrets.PLANETSCALE_API_TOKEN }} | |
| PLANETSCALE_ORGANIZATION: ${{ secrets.PLANETSCALE_ORGANIZATION }} | |
| ci-prisma-postgres: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.prisma-postgres == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/prisma-postgres | |
| - run: bun run test | |
| working-directory: packages/prisma-postgres | |
| env: | |
| PRISMA_POSTGRES_API_TOKEN: ${{ secrets.PRISMA_POSTGRES_API_TOKEN }} | |
| ci-stripe: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.stripe == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/stripe | |
| ci-supabase: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.supabase == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/supabase | |
| # Supabase's management API is missing primitives we'd normally use | |
| # to avoid leaking test resources between CI runs: | |
| # - no DELETE /v1/organizations/{slug}, so any org a test creates | |
| # is permanent (gated separately by | |
| # SUPABASE_RUN_ORGANIZATION_CREATION_TESTS). | |
| # - v1DeleteAProject returns immediately but the project lingers | |
| # for ~30s in REMOVED state while still counting toward the | |
| # free-tier 2-active-project ceiling, so a previous CI run that | |
| # was killed mid-test or finished within the propagation window | |
| # leaves the next run unable to create new projects. | |
| # Nuke before each run so we start from a clean slate. Failures are | |
| # tolerated — the in-test FreeProjectLimitReached recovery path | |
| # sweeps again if needed. | |
| - run: bun run nuke || true | |
| working-directory: packages/supabase | |
| env: | |
| SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} | |
| - run: bun run test | |
| working-directory: packages/supabase | |
| env: | |
| SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} | |
| ci-mongodb-atlas: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.mongodb-atlas == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/mongodb-atlas | |
| ci-fly-io: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.fly-io == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/fly-io | |
| ci-turso: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.turso == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/turso | |
| ci-coinbase: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.coinbase == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/coinbase | |
| ci-kubernetes: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.kubernetes == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/kubernetes | |
| ci-azure: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.azure == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/azure | |
| ci-axiom: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.axiom == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/axiom | |
| - run: bun run test | |
| working-directory: packages/axiom | |
| env: | |
| AXIOM_ORG_ID: ${{ secrets.AXIOM_ORG_ID }} | |
| AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }} | |
| ci-posthog: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.posthog == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/posthog | |
| - run: bun run test | |
| working-directory: packages/posthog | |
| env: | |
| POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} | |
| POSTHOG_PROJECT_ID: ${{ secrets.POSTHOG_PROJECT_ID }} | |
| ci-typesense: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.typesense == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/typesense | |
| ci-workos: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.workos == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/workos | |
| - run: bun run test | |
| working-directory: packages/workos | |
| env: | |
| WORKOS_API_KEY: ${{ secrets.WORKOS_API_KEY }} | |
| ci-expo-eas: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.expo-eas == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install | |
| - run: bun run build | |
| working-directory: packages/core | |
| - run: bun run check | |
| working-directory: packages/expo-eas | |
| - run: bun run test | |
| working-directory: packages/expo-eas | |
| env: | |
| EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} |