doc: Add adapters in v2 migration docs #985
Workflow file for this run
This file contains 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: CI/CD | |
on: | |
push: | |
pull_request: | |
types: [opened, reopened] | |
env: | |
FORCE_COLOR: 3 # Diplay chalk colors | |
jobs: | |
ci: | |
# Watch out! When changing the job name, | |
# update the required checks in GitHub | |
# branch protection settings for `next`. | |
name: CI (${{ matrix.next-version }}${{ matrix.base-path && ' basePath' || ''}}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# Watch out! When changing the compat grid, | |
# update the required checks in GitHub | |
# branch protection settings for `next`. | |
base-path: [false, '/base'] | |
next-version: | |
- '14.1.2' | |
- '14.1.3' | |
- '14.1.4' | |
- '14.2.0' | |
- '14.2.1' | |
- '14.2.2' | |
- '14.2.3' | |
- '14.2.4' | |
- '14.2.5' | |
- '14.2.6' | |
- '14.2.7' | |
- latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 | |
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b | |
with: | |
node-version-file: .node-version | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Install Next.js version ${{ matrix.next-version }} | |
run: pnpm add --filter e2e next@${{ matrix.next-version }} | |
- name: Run integration tests | |
run: pnpm run test | |
env: | |
BASE_PATH: ${{ matrix.base-path && matrix.base-path || '/' }} | |
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@50769540e7f4bd5e21e526ee35c689e35e0d6874 | |
if: failure() | |
with: | |
path: packages/e2e/cypress/screenshots | |
name: ci-${{ matrix.next-version }}${{ matrix.base-path && '-basePath' || ''}} | |
- uses: 47ng/actions-slack-notify@main | |
name: Notify on Slack | |
if: always() | |
with: | |
status: ${{ job.status }} | |
jobName: next@${{ matrix.next-version }}${{ matrix.base-path && ' basePath' || ''}} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
lint: | |
name: Linting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 | |
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b | |
with: | |
node-version-file: .node-version | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --ignore-scripts --frozen-lockfile | |
- name: Check monorepo with Sherif | |
run: pnpm dlx sherif@1.0.0 --no-install | |
- name: Check source code formatting | |
run: | | |
set +e # Allow Prettier to fail, but capture the error code | |
output=$(./node_modules/.bin/prettier --list-different ./packages/nuqs 2>&1) | |
exit_code=$? | |
set -e | |
if [ $exit_code -ne 0 ]; then | |
echo "$output" | while IFS= read -r file; do | |
echo "::warning file=$file::Prettier detected formatting issues in $file" | |
done | |
exit $exit_code | |
else | |
echo "No formatting issues found" | |
fi | |
cd: | |
name: Deployment | |
runs-on: ubuntu-latest | |
needs: [ci] | |
if: ${{ github.ref_name == 'master' || github.ref_name == 'beta' }} | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 | |
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b | |
with: | |
node-version-file: .node-version | |
cache: pnpm | |
# Note: we do not use an external Turbo cache for publishing | |
# to prevent against possible cache collision attacks. | |
- name: Install dependencies | |
run: pnpm install --ignore-scripts --frozen-lockfile | |
- name: Build package | |
run: pnpm build --filter nuqs | |
- name: Semantic Release | |
run: ../../node_modules/.bin/semantic-release | |
working-directory: packages/nuqs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Invalidate ISR cache for NPM in the docs | |
run: curl -s "https://nuqs.47ng.com/api/isr?tag=npm&token=${{ secrets.ISR_TOKEN }}" |