fix: Migrator attempts to create schema even when it exists #4185
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: test | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - '**/*' | |
| - '!.github/workflows/*.yml' | |
| - '.github/workflows/test.yml' | |
| - '!assets/**' | |
| - '!docs/**' | |
| - '!example/**' | |
| - '!site/**' | |
| - '!.node-version' | |
| - '!.nvmrc' | |
| - '!.prettierignore' | |
| - '!.prettierrc.json' | |
| - '!*.md' | |
| - '!LICENSE' | |
| pull_request: | |
| paths: | |
| - '**/*' | |
| - '!.github/workflows/*.yml' | |
| - '.github/workflows/test.yml' | |
| - '!assets/**' | |
| - '!docs/**' | |
| - '!example/**' | |
| - '!site/**' | |
| - '!.node-version' | |
| - '!.nvmrc' | |
| - '!.prettierignore' | |
| - '!.prettierrc.json' | |
| - '!*.md' | |
| - '!LICENSE' | |
| workflow_dispatch: | |
| jobs: | |
| node: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # https://endoflife.date/nodejs | |
| node-version: [20.x, 22.x, 24.x] | |
| with-transformer: [false, true] | |
| runs-on: ubuntu-latest | |
| name: Node.js (${{ matrix.node-version }})${{ matrix.with-transformer && ' /w transformer' || '' }} | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | |
| with: | |
| cache: 'pnpm' | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run docker compose | |
| run: docker compose up -d | |
| - name: Run node tests | |
| run: ${{ matrix.with-transformer && 'TEST_TRANSFORMER=1 ' || '' }}pnpm test | |
| - name: Run esbuild test | |
| if: ${{ !matrix.with-transformer }} | |
| run: pnpm test:esbuild | |
| deno: | |
| name: Deno | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # https://endoflife.date/deno | |
| deno-version: [2.2.x, 2.4.x] | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
| - name: Use Node.js | |
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | |
| with: | |
| cache: 'pnpm' | |
| node-version: lts/* | |
| - name: Use Deno ${{ matrix.deno-version }} | |
| uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3 | |
| with: | |
| deno-version: ${{ matrix.deno-version }} | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run docker compose | |
| run: docker compose up -d | |
| - name: Build | |
| run: pnpm build | |
| - name: Run deno tests | |
| run: pnpm test:deno | |
| bun: | |
| name: Bun | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| bun-version: [1.1, 1.2] | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
| - name: Use Node.js | |
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | |
| with: | |
| cache: 'pnpm' | |
| node-version: lts/* | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Use Bun ${{ matrix.bun-version }} | |
| uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # 2.0.2 | |
| with: | |
| bun-version: ${{ matrix.bun-version }} | |
| - name: Run docker compose | |
| run: docker compose up -d | |
| - name: Run bun tests | |
| run: pnpm test:bun | |
| browser: | |
| name: Browser | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
| - name: Use Node.js | |
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | |
| with: | |
| cache: 'pnpm' | |
| node-version: lts/* | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Install playwright | |
| run: pnpx playwright install chromium | |
| - name: Run browser tests | |
| run: pnpm test:browser | |
| cloudflare-workers: | |
| name: Cloudflare Workers | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
| - name: Use Node.js | |
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | |
| with: | |
| cache: 'pnpm' | |
| node-version: lts/* | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run docker compose | |
| run: docker compose up -d | |
| - name: Run cloudflare workers test | |
| run: pnpm test:cloudflare-workers | |
| older-typescript-version: | |
| name: Older TypeScript version | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| typescript-version: [ | |
| ~4.6.0, # 28.2.2022 https://devblogs.microsoft.com/typescript/announcing-typescript-4-6/ | |
| ~4.7.0, # 24.5.2022 https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/ | |
| ~4.8.0, # 25.8.2022 https://devblogs.microsoft.com/typescript/announcing-typescript-4-8/ | |
| ~4.9.0, # 15.11.2022 https://devblogs.microsoft.com/typescript/announcing-typescript-4-9/ | |
| ~5.0.0, # 16.3.2023 https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/ | |
| ~5.2.0, # 24.8.2023 https://devblogs.microsoft.com/typescript/announcing-typescript-5-1/ https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/ | |
| ~5.3.0, # 20.11.2023 https://devblogs.microsoft.com/typescript/announcing-typescript-5-3/ | |
| ~5.4.0, # 6.3.2024 https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/ | |
| ~5.8.0, # 28.2.2025 https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/ https://devblogs.microsoft.com/typescript/announcing-typescript-5-6/ https://devblogs.microsoft.com/typescript/announcing-typescript-5-7/ https://devblogs.microsoft.com/typescript/announcing-typescript-5-8/ | |
| # ~5.9.0, # 1.8.2025 https://devblogs.microsoft.com/typescript/announcing-typescript-5-9/ | |
| ] | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
| - name: Use Node.js | |
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | |
| with: | |
| cache: 'pnpm' | |
| node-version: lts/* | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run build with newer TypeScript | |
| run: pnpm build | |
| - name: Set TypeScript and TSD versions | |
| run: | | |
| TS_VERSION="${{ matrix.typescript-version }}" | |
| echo "TS_VERSION=$TS_VERSION" >> $GITHUB_ENV | |
| TSD_VERSION=$(echo '{"~4.6.0":"0.20.0", "~4.7.0":"0.22.0", "~4.8.0":"0.24.1", "~4.9.0":"0.27.0", "~5.0.0":"0.28.1", "~5.2.0":"0.29.0", "~5.3.0":"0.30.7", "~5.4.0":"0.31.2", "~5.8.0":"0.32.0", "~5.9.0":"0.33.0"}' | jq -r --arg key "$TS_VERSION" '.[$key]') | |
| echo "TSD_VERSION=$TSD_VERSION" >> $GITHUB_ENV | |
| - name: Install Typescript (${{ env.TS_VERSION }}) and TSD (${{ env.TSD_VERSION }}) | |
| run: pnpm i -D typescript@${{ env.TS_VERSION }} tsd@${{ env.TSD_VERSION }} | |
| - name: Exclude non-backward compatible tests | |
| run: pnpm script:exclude-test-files-for-backwards-compat | |
| - name: Run tests with older TypeScript version | |
| run: pnpm test:typings${{ env.TS_VERSION != '~4.6.0' && ' && pnpm test:node:build' || '' }} | |
| jsdocs: | |
| name: JSDocs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
| - name: Use Node.js | |
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | |
| with: | |
| cache: 'pnpm' | |
| node-version: lts/* | |
| - name: Use Deno | |
| uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3 | |
| with: | |
| deno-version: 2.x | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build | |
| - name: Type-check JSDocs code blocks | |
| run: pnpm test:jsdocs | |
| typescript-native: | |
| name: TypeScript Native | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
| - name: Use Node.js | |
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | |
| with: | |
| cache: 'pnpm' | |
| node-version: lts/* | |
| - name: Install dependencies | |
| run: pnpm i | |
| - name: Build | |
| run: pnpm build | |
| - name: Run TypeScript Native tests | |
| run: pnpx @typescript/native-preview --project ./test/node/tsconfig.json | |
| typescript-composite: | |
| name: TypeScript Composite | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
| - name: Use Node.js | |
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | |
| with: | |
| cache: 'pnpm' | |
| node-version: lts/* | |
| - name: Install dependencies | |
| run: pnpm i | |
| - name: Test | |
| working-directory: test/composite-ts | |
| run: npm i && npm run check:types |