feat(server): migrate next.js server adapter #524
  
    
      This file contains hidden or 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: Build and Test | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| env: | |
| TELEMETRY_TRACKING_TOKEN: ${{ secrets.TELEMETRY_TRACKING_TOKEN }} | |
| DO_NOT_TRACK: '1' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-test: | |
| runs-on: buildjet-8vcpu-ubuntu-2204 | |
| services: | |
| postgres: | |
| image: postgres | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| # Set health checks to wait until postgres has started | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| provider: [sqlite, postgresql] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 10.12.1 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: buildjet/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'pnpm' | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - name: Setup pnpm cache | |
| uses: buildjet/cache@v3 | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: | | |
| pnpm run build | |
| pnpm tsx packages/cli/scripts/post-build.ts | |
| - name: Lint | |
| run: pnpm run lint | |
| - name: Test | |
| run: TEST_DB_PROVIDER=${{ matrix.provider }} pnpm run test |