Test against Next.js 16.1.0-canary.15 #1612
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 against Next.js release" | |
| run-name: "Test against Next.js ${{ inputs.version }}" | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Next.js version to test against" | |
| required: true | |
| type: string | |
| env: | |
| FORCE_COLOR: 3 # Diplay chalk colors | |
| VERSION: ${{ inputs.version }} | |
| jobs: | |
| test_against_nextjs_release: | |
| name: CI (next@${{ inputs.version }}${{ matrix.base-path && ' ⚾' || ''}}${{ matrix.react-compiler && ' ⚛️' || ''}}) | |
| runs-on: ubuntu-24.04-arm | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| base-path: [false, "/base"] | |
| react-compiler: [true, false] | |
| steps: | |
| - name: Ensure input follows SemVer | |
| # Source: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string | |
| run: | | |
| node -e " | |
| const version = process.env.VERSION; | |
| const semverRegex = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; | |
| if (!semverRegex.test(version)) { | |
| console.error(\`Error: Version '\${version}' does not follow SemVer format\`); | |
| process.exit(1); | |
| } | |
| console.log(\`Version '\${version}' is valid SemVer\`); | |
| " | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 | |
| with: | |
| node-version-file: .node-version | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Install Next.js version ${{ env.VERSION }} | |
| run: pnpm add --filter e2e-next --filter nuqs "next@${{ env.VERSION }}" | |
| - name: Run integration tests | |
| run: pnpm run test --filter e2e-next | |
| env: | |
| BASE_PATH: ${{ matrix.base-path && matrix.base-path || '/' }} | |
| REACT_COMPILER: ${{ matrix.react-compiler }} | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
| E2E_NO_CACHE_ON_RERUN: ${{ github.run_attempt }} | |
| - name: Save Cypress artifacts | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 | |
| if: failure() | |
| with: | |
| path: packages/e2e-next/cypress/screenshots | |
| name: ci-next-${{ env.VERSION }}${{ matrix.base-path && '-basePath' || ''}}${{ matrix.react-compiler && '-react-compiler' || ''}} | |
| - uses: 47ng/actions-slack-notify@main | |
| name: Notify on Slack | |
| if: failure() | |
| with: | |
| status: ${{ job.status }} | |
| jobName: next@${{ env.VERSION }}${{ matrix.base-path && ' ⚾' || ''}}${{ matrix.react-compiler && ' ⚛️' || ''}} | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| invalidate-isr-cache: | |
| name: Invalidate ISR cache | |
| runs-on: ubuntu-24.04-arm | |
| needs: test_against_nextjs_release | |
| if: ${{ always() }} | |
| steps: | |
| - name: Invalidate ISR cache for GitHub Actions status on landing page | |
| run: curl -s "https://nuqs.dev/api/isr?tag=github-actions-status&token=${{ secrets.ISR_TOKEN }}" | |
| notify: | |
| name: Notify on Slack | |
| runs-on: ubuntu-24.04-arm | |
| needs: | |
| - test_against_nextjs_release | |
| steps: | |
| - uses: 47ng/actions-slack-notify@main | |
| with: | |
| status: ${{ job.status }} | |
| jobName: "${{ env.VERSION }}" | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |