Skip to content

Test against Next.js 14.1.1-canary.24 #197

Test against Next.js 14.1.1-canary.24

Test against Next.js 14.1.1-canary.24 #197

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
jobs:
test_against_nextjs_release:
name: CI (${{ inputs.version }}${{ matrix.base-path && ' basePath' || ''}}${{ matrix.window-history-support && ' WHS' || ''}})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
base-path: [false, '/base']
window-history-support: [true, false]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598
with:
version: 8
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: lts/*
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Install Next.js version ${{ inputs.version }}
run: pnpm add --filter e2e next@${{ inputs.version }}
- name: Run integration tests
run: pnpm run test
env:
BASE_PATH: ${{ matrix.base-path && matrix.base-path || '/' }}
WINDOW_HISTORY_SUPPORT: ${{ matrix.window-history-support }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
- name: Save Cypress artifacts
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
if: failure()
with:
path: packages/e2e/cypress/screenshots
name: ci-${{ inputs.version }}${{ matrix.base-path && '-basePath' || ''}}${{ matrix.window-history-support && '-whs' || ''}}
- uses: 47ng/actions-slack-notify@main
name: Notify on Slack
if: always()
with:
status: ${{ job.status }}
jobName: next@${{ inputs.version }}${{ matrix.base-path && ' basePath' || ''}}${{ matrix.window-history-support && ' WHS' || ''}}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
invalidate-isr-cache:
name: Invalidate ISR cache
runs-on: ubuntu-latest
needs: test_against_nextjs_release
if: ${{ always() }}
steps:
- name: Invalidate ISR cache for GitHub Actions status on landing page
run: curl -s "https://nuqs.47ng.com/api/isr?tag=github-actions-status&token=${{ secrets.ISR_TOKEN }}"