🐸 Versioned release #1356
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: Framework Integration Tests | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled] | |
| workflow_dispatch: | |
| inputs: | |
| force-all: | |
| description: 'Run all framework tests regardless of changes' | |
| type: boolean | |
| default: false | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| detect-integrations: | |
| name: Detect Changed Integrations | |
| runs-on: ubuntu-latest | |
| permissions: {} | |
| outputs: | |
| any-changed: ${{ steps.detect.outputs.any-changed }} | |
| integrations: ${{ steps.detect.outputs.integrations }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Detect changed integrations | |
| id: detect | |
| run: | | |
| ARGS="" | |
| if [[ "${{ github.event.inputs.force-all }}" == "true" ]] || [[ "${{ contains(github.event.pull_request.labels.*.name, 'framework-tests') }}" == "true" ]]; then | |
| ARGS="--all" | |
| elif [[ "${{ github.head_ref }}" == "bumpy/version-packages" ]]; then | |
| ARGS="--release-pr" | |
| fi | |
| bun run scripts/detect-changed-integrations.ts $ARGS | |
| build: | |
| name: Build Libraries | |
| needs: detect-integrations | |
| if: needs.detect-integrations.outputs.any-changed == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24.x' | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Enable turborepo build cache | |
| uses: rharkor/caching-for-turbo@56219402aacc0d06b650d898c222996dbc1191ec # v2.3.14 | |
| - name: Build libraries | |
| run: bun run build:libs | |
| - name: Upload built repo for framework tests | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: built-repo | |
| path: | | |
| packages/*/dist/ | |
| packages/integrations/*/dist/ | |
| retention-days: 1 | |
| test: | |
| name: Framework Tests (${{ matrix.integration.name }}) | |
| needs: [detect-integrations, build] | |
| if: needs.detect-integrations.outputs.any-changed == 'true' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| integration: ${{ fromJson(needs.detect-integrations.outputs.integrations) }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24.x' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| with: | |
| version: 10 | |
| - name: Cache pnpm store | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.local/share/pnpm/store/v3 | |
| key: pnpm-${{ runner.os }}-${{ matrix.integration.name }}-${{ hashFiles('framework-tests/**/package.json') }} | |
| restore-keys: | | |
| pnpm-${{ runner.os }}-${{ matrix.integration.name }}- | |
| pnpm-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Download built libraries | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: built-repo | |
| path: packages/ | |
| - name: Run ${{ matrix.integration.name }} framework tests | |
| run: cd framework-tests && bun install && bun run test -- --reporter=verbose frameworks/${{ matrix.integration.testPath }} | |
| timeout-minutes: 15 | |
| env: | |
| NEXTJS_TURBO_ONLY: ${{ contains(matrix.integration.name, '(quick)') && '1' || '' }} | |
| NEXT_TELEMETRY_DISABLED: '1' |