Skip to content

Add i18n keys for Image component; define en values. #97

Add i18n keys for Image component; define en values.

Add i18n keys for Image component; define en values. #97

Workflow file for this run

name: Compatibility + E2E
on:
pull_request:
push:
branches: [main]
jobs:
examples:
name: React 18 and 19 Compatibility
runs-on: ubuntu-latest
env:
NPM_CONFIG_OPTIONAL: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node 24
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- name: Install root deps (allow peer mismatch)
run: npm ci --legacy-peer-deps
- name: Ensure Rollup binary (Linux)
if: runner.os == 'Linux'
run: |
set -e
ROLLUP_VERSION=$(node -p "require('./package-lock.json').packages['node_modules/rollup']?.version || ''")
echo "Detected rollup version: ${ROLLUP_VERSION}"
if [ -n "$ROLLUP_VERSION" ]; then
npm i -D --no-audit --no-fund "@rollup/rollup-linux-x64-gnu@${ROLLUP_VERSION}"
else
echo "Rollup not found in package-lock.json; skipping explicit binary install"
fi
- name: Build library
run: npm run build
- name: Pack library
id: pack
shell: bash
run: |
# Capture only the tarball filename (last line), stripping any CRs
PKG_TGZ=$(npm pack --silent | tail -n 1 | tr -d '\r')
echo "PKG_TGZ=$PKG_TGZ" >> "$GITHUB_ENV"
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: React 19 - install deps
working-directory: playwright/next-react19
run: |
npm i --no-audit --no-fund next@15 react@19 react-dom@19
npm i --no-audit --no-fund --no-save "../../${{ env.PKG_TGZ }}"
- name: React 19 - build example
working-directory: playwright/next-react19
run: npm run build
- name: React 19 - start example (background)
working-directory: playwright/next-react19
run: |
nohup npm run start -- -p 3000 >/dev/null 2>&1 &
echo $! > .server_pid
- name: Wait for React 19 example to be ready
run: |
for i in {1..60}; do
if curl -sf http://localhost:3000 >/dev/null; then exit 0; fi
sleep 1
done
echo "Server did not start in time" && exit 1
- name: React 19 - run Playwright tests (app home)
working-directory: playwright
env:
BASE_URL: http://localhost:3000
CI: "1"
run: npx playwright test e2e/compat.spec.ts
- name: React 19 - stop example
if: always()
working-directory: playwright/next-react19
run: |
kill $(cat .server_pid) || true
- name: React 18 - install deps
working-directory: playwright/next-react18
run: |
npm i --no-audit --no-fund [email protected] [email protected] [email protected]
npm i --no-audit --no-fund --no-save "../../${{ env.PKG_TGZ }}"
- name: React 18 - build example
working-directory: playwright/next-react18
run: npm run build
- name: React 18 - start example (background)
working-directory: playwright/next-react18
run: |
nohup npm run start -- -p 3001 >/dev/null 2>&1 &
echo $! > .server_pid
- name: Wait for React 18 example to be ready
run: |
for i in {1..60}; do
if curl -sf http://localhost:3001 >/dev/null; then exit 0; fi
sleep 1
done
echo "Server did not start in time" && exit 1
- name: React 18 - run Playwright tests (app home)
working-directory: playwright
env:
BASE_URL: http://localhost:3001
CI: "1"
run: npx playwright test e2e/compat.spec.ts
- name: React 18 - stop example
if: always()
working-directory: playwright/next-react18
run: |
kill $(cat .server_pid) || true