fix the registerBlock calls in all block files #16
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: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| DATABASE_URL: postgresql://postgres:postgres@localhost:5432/nextpress_test | |
| TEST_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/nextpress_test | |
| NEXTAUTH_SECRET: ci-test-secret-not-for-production-use-only | |
| NEXTAUTH_URL: http://localhost:3000 | |
| ADMIN_PASSWORD: ci-test-password-12chars | |
| CRON_SECRET: ci-cron-secret | |
| REVALIDATION_SECRET: ci-revalidation-secret | |
| jobs: | |
| # ── Validate project structure ── | |
| validate: | |
| name: Validate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - name: Validate Prisma schema | |
| run: pnpm --filter @nextpress/db exec prisma validate | |
| - name: Generate Prisma client | |
| run: pnpm --filter @nextpress/db exec prisma generate | |
| - name: Typecheck (informational) | |
| run: pnpm turbo typecheck | |
| continue-on-error: true | |
| # ── Unit tests ── | |
| unit-tests: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| needs: [validate] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - name: Run unit tests with coverage | |
| run: pnpm --filter @nextpress/core exec vitest run --reporter=verbose --coverage | |
| env: | |
| SKIP_DB: "true" | |
| continue-on-error: true | |
| - name: Upload coverage to Codecov | |
| if: always() | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| directory: packages/core/coverage/ | |
| flags: unit | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload coverage artifact | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: unit-coverage | |
| path: packages/core/coverage/ | |
| if-no-files-found: ignore | |
| # ── Integration tests ── | |
| integration-tests: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| needs: [validate] | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: nextpress_test | |
| ports: ["5432:5432"] | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - name: Generate Prisma client | |
| run: pnpm --filter @nextpress/db exec prisma generate | |
| - name: Deploy migrations | |
| run: pnpm --filter @nextpress/db exec prisma migrate deploy | |
| continue-on-error: true | |
| - name: Run integration tests | |
| run: pnpm --filter @nextpress/core exec vitest run --reporter=verbose | |
| continue-on-error: true | |
| # ── Gate ── | |
| ci-passed: | |
| name: CI Passed | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: [validate, unit-tests, integration-tests] | |
| steps: | |
| - name: Check required jobs | |
| run: | | |
| echo "validate: ${{ needs.validate.result }}" | |
| echo "unit-tests: ${{ needs.unit-tests.result }}" | |
| echo "integration-tests: ${{ needs.integration-tests.result }}" | |
| if [[ "${{ needs.validate.result }}" != "success" ]]; then | |
| echo "Validate job failed — blocking merge." | |
| exit 1 | |
| fi | |
| echo "Required checks passed." |