World postgres - queue driver #1854
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: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "!*" | |
| pull_request: | |
| concurrency: | |
| # Unique group for this workflow and branch | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| unit: | |
| name: Unit Tests (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| env: | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 10.14.0 | |
| - name: Setup Node.js 22.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: "pnpm" | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile --ignore-scripts | |
| - name: Run Unit Tests | |
| run: pnpm test --filter='!./docs' | |
| e2e-vercel-prod: | |
| name: E2E Vercel Prod Tests (${{ matrix.app.name }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| app: | |
| - name: "example" | |
| project-id: "prj_xWq20Dd860HHAfzMjK2Mb6TPVxMa" | |
| - name: "nextjs-turbopack" | |
| project-id: "prj_yjkM7UdHliv8bfxZ1sMJQf1pMpdi" | |
| - name: "nextjs-webpack" | |
| project-id: "prj_avRPBF3eWjh6iDNQgmhH4VOg27h0" | |
| - name: "nitro" | |
| project-id: "prj_e7DZirYdLrQKXNrlxg7KmA6ABx8r" | |
| - name: "vite" | |
| project-id: "prj_uLIcNZNDmETulAvj5h0IcDHi5432" | |
| - name: "nuxt" | |
| project-id: "prj_oTgiz3SGX2fpZuM6E0P38Ts8de6d" | |
| - name: "sveltekit" | |
| project-id: "prj_MqnBLm71ceXGSnm3Fs8i8gBnI23G" | |
| - name: "hono" | |
| project-id: "prj_p0GIEsfl53L7IwVbosPvi9rPSOYW" | |
| env: | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 10.14.0 | |
| - name: Setup Node.js 22.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: "pnpm" | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build CLI | |
| run: pnpm turbo run build --filter='@workflow/cli' | |
| - name: Waiting for the Vercel deployment | |
| id: waitForDeployment | |
| uses: ./.github/actions/wait-for-vercel-project | |
| with: | |
| team-id: "team_nO2mCG4W8IxPIeKoSsqwAxxB" | |
| project-id: ${{ matrix.app.project-id }} | |
| vercel-token: ${{ secrets.VERCEL_LABS_TOKEN }} | |
| timeout: 1000 | |
| check-interval: 15 | |
| environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'preview' }} | |
| - name: Run E2E Tests | |
| run: pnpm run test:e2e | |
| env: | |
| DEPLOYMENT_URL: ${{ steps.waitForDeployment.outputs.deployment-url }} | |
| APP_NAME: ${{ matrix.app.name }} | |
| WORKFLOW_VERCEL_ENV: ${{ github.ref == 'refs/heads/main' && 'production' || 'preview' }} | |
| WORKFLOW_VERCEL_AUTH_TOKEN: ${{ secrets.VERCEL_LABS_TOKEN }} | |
| WORKFLOW_VERCEL_TEAM: "team_nO2mCG4W8IxPIeKoSsqwAxxB" | |
| WORKFLOW_VERCEL_PROJECT: ${{ matrix.app.project-id }} | |
| getTestMatrix: | |
| name: Get Test Matrix | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 10.14.0 | |
| - name: Setup Node.js 22.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: "pnpm" | |
| - id: set-matrix | |
| run: echo "matrix=$(node ./scripts/create-test-matrix.mjs)" >> $GITHUB_OUTPUT | |
| e2e-local-dev: | |
| name: E2E Local Dev Tests (${{ matrix.app.name }} - ${{ matrix.app.canary && 'canary' || 'stable' }}) | |
| runs-on: ubuntu-latest | |
| needs: getTestMatrix | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{fromJson(needs.getTestMatrix.outputs.matrix)}} | |
| env: | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 10.14.0 | |
| - name: Setup Node.js 22.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: "pnpm" | |
| - name: Setup canary | |
| if: ${{ matrix.app.canary }} | |
| run: | | |
| cat packages/next/package.json | jq '.dependencies.next|="canary"' > packages/next/package.json.new && mv packages/next/package.json.new packages/next/package.json | |
| cat workbench/${{ matrix.app.name }}/package.json | jq '.dependencies.next|="canary"' > workbench/${{ matrix.app.name }}/package.json.new && mv workbench/${{ matrix.app.name }}/package.json.new workbench/${{ matrix.app.name }}/package.json | |
| pnpm install --no-frozen-lockfile | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run Initial Build | |
| run: pnpm turbo run build --filter='!./workbench/*' | |
| - name: Resolve symlinks | |
| run: ./scripts/resolve-symlinks.sh workbench/${{ matrix.app.name }} | |
| - name: Run E2E Tests | |
| run: cd workbench/${{ matrix.app.name }} && pnpm dev & echo "starting tests in 10 seconds" && sleep 10 && pnpm vitest run packages/core/e2e/dev.test.ts && pnpm run test:e2e | |
| env: | |
| APP_NAME: ${{ matrix.app.name }} | |
| DEPLOYMENT_URL: "http://localhost:${{ matrix.app.name == 'sveltekit' && '5173' || '3000' }}" | |
| DEV_TEST_CONFIG: ${{ toJSON(matrix.app) }} | |
| e2e-local-prod: | |
| name: E2E Local Prod Tests (${{ matrix.app.name }} - ${{ matrix.app.canary && 'canary' || 'stable' }}) | |
| runs-on: ubuntu-latest | |
| needs: getTestMatrix | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{fromJson(needs.getTestMatrix.outputs.matrix)}} | |
| env: | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 10.14.0 | |
| - name: Setup Node.js 22.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: "pnpm" | |
| - name: Setup canary | |
| if: ${{ matrix.app.canary }} | |
| run: | | |
| cat packages/next/package.json | jq '.dependencies.next|="canary"' > packages/next/package.json.new && mv packages/next/package.json.new packages/next/package.json | |
| cat workbench/${{ matrix.app.name }}/package.json | jq '.dependencies.next|="canary"' > workbench/${{ matrix.app.name }}/package.json.new && mv workbench/${{ matrix.app.name }}/package.json.new workbench/${{ matrix.app.name }}/package.json | |
| pnpm install --no-frozen-lockfile | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run Initial Build | |
| run: pnpm turbo run build --filter='!./workbench/*' | |
| - name: Run Build Tests | |
| run: pnpm vitest run packages/core/e2e/local-build.test.ts | |
| env: | |
| APP_NAME: ${{ matrix.app.name }} | |
| - name: Run E2E Tests | |
| run: cd workbench/${{ matrix.app.name }} && pnpm start & echo "starting tests in 10 seconds" && sleep 10 && pnpm run test:e2e | |
| env: | |
| APP_NAME: ${{ matrix.app.name }} | |
| DEPLOYMENT_URL: "http://localhost:${{ matrix.app.name == 'sveltekit' && '4173' || '3000' }}" | |
| e2e-windows: | |
| name: E2E Windows Tests | |
| runs-on: windows-latest | |
| env: | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: wasm32-unknown-unknown | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 10.14.0 | |
| - name: Setup Node.js 22.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: "pnpm" | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile --ignore-scripts | |
| - name: Run Initial Build | |
| run: pnpm turbo run build --filter='!./workbench/*' --filter='!./docs' | |
| - name: Run E2E Tests (Next.js) | |
| run: | | |
| cd workbench/nextjs-turbopack | |
| $job = Start-Job -ScriptBlock { Set-Location $using:PWD; pnpm dev } | |
| Start-Sleep -Seconds 15 | |
| cd ../.. | |
| pnpm vitest run packages/core/e2e/dev.test.ts | |
| pnpm run test:e2e | |
| Stop-Job $job | |
| shell: powershell | |
| env: | |
| APP_NAME: "nextjs-turbopack" | |
| DEPLOYMENT_URL: "http://localhost:3000" | |
| DEV_TEST_CONFIG: '{"generatedStepPath":"app/.well-known/workflow/v1/step/route.js","generatedWorkflowPath":"app/.well-known/workflow/v1/flow/route.js","apiFilePath":"app/api/chat/route.ts","apiFileImportPath":"../../..","port":3000}' |