Skip to content

feat(adapter-nextjs): add Next.js adapter package with unified CLI #124

feat(adapter-nextjs): add Next.js adapter package with unified CLI

feat(adapter-nextjs): add Next.js adapter package with unified CLI #124

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-test:
name: Build, Lint and Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build packages
run: npm run build
- name: Run linting
run: npm run lint
- name: Run type checking
run: npm run typecheck
env:
UDL_USE_MOCKS: 'true'
- name: Run tests
run: npm run test
validate-changesets:
name: Validate Changesets
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.head_ref != 'changeset-release/main'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Check for changesets
run: |
npx changeset status --since origin/${{ github.base_ref }}
# Check if there are any changesets
if [ -z "$(ls .changeset/*.md 2>/dev/null | grep -v README.md)" ]; then
echo "⚠️ No changesets found. Please add a changeset for your changes."
echo "Run 'npm run changeset' to add a changeset."
exit 1
fi