fix: Correctly detect base path at the app root /
when using a locale prefix strategy other than always
. This ensures the locale cookie is set correctly.
#1521
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: main | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
name: Build, lint, and test | |
runs-on: ubuntu-latest | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8.6.0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.17.0 | |
cache: 'pnpm' | |
- run: pnpm install | |
# Next.js caching | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/examples/*/.next/cache | |
key: ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }} | |
# Playwright | |
- run: | | |
PLAYWRIGHT_VERSION=$(cat pnpm-lock.yaml | grep /@playwright/test@ | sed 's/.*@\([^:]*\):.*/\1/') | |
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
name: Restore playwright | |
id: cache-playwright-browsers | |
with: | |
path: ~/.cache/ms-playwright | |
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }} | |
- if: steps.cache-playwright-browsers.outputs.cache-hit != 'true' | |
# Setting up playwright in one example is sufficient | |
run: pnpm --filter example-app-router-playground exec playwright install --with-deps | |
- run: pnpm run build | |
- run: pnpm run lint | |
- run: pnpm run test | |
- run: pnpm run size |