fix : migration error fix on neon DB #25
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: CI | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| web: ${{ steps.filter.outputs.web }} | |
| api: ${{ steps.filter.outputs.api }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Detect changed paths | |
| id: filter | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| web: | |
| - 'apps/web/**' | |
| - 'packages/types/**' | |
| - 'package.json' | |
| - 'pnpm-lock.yaml' | |
| - 'pnpm-workspace.yaml' | |
| - 'turbo.json' | |
| - '.github/workflows/ci.yml' | |
| api: | |
| - 'apps/api/**' | |
| - 'packages/types/**' | |
| - 'package.json' | |
| - 'pnpm-lock.yaml' | |
| - 'pnpm-workspace.yaml' | |
| - 'turbo.json' | |
| - '.github/workflows/ci.yml' | |
| web: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.web == 'true' }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.12.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| env: | |
| DATABASE_URL: postgres://dummy:dummy@localhost:5432/dummy | |
| run: pnpm install --frozen-lockfile | |
| - name: Build shared types | |
| run: pnpm --filter @stack/types build | |
| # - name: Lint web | |
| # run: pnpm --filter web lint | |
| - name: Typecheck web | |
| run: pnpm --filter web exec tsc --noEmit | |
| - name: Build web | |
| env: | |
| DATABASE_URL: postgres://dummy:dummy@localhost:5432/dummy | |
| run: pnpm --filter web build | |
| api: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.api == 'true' }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.12.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| env: | |
| DATABASE_URL: postgres://dummy:dummy@localhost:5432/dummy | |
| run: pnpm install --frozen-lockfile | |
| - name: Build shared types | |
| run: pnpm --filter @stack/types build | |
| - name: Build API | |
| env: | |
| DATABASE_URL: postgres://dummy:dummy@localhost:5432/dummy | |
| run: pnpm --filter api build | |
| ci-status: | |
| name: CI status | |
| needs: [changes, web, api] | |
| if: ${{ always() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Ensure required checks passed | |
| run: | | |
| if [ "${{ needs.web.result }}" = "failure" ] || [ "${{ needs.api.result }}" = "failure" ]; then | |
| echo "A required CI job failed." | |
| exit 1 | |
| fi | |
| echo "CI checks completed successfully." |