feat(services): sync domain verification loop from constructive-db #457
Workflow file for this run
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: pgpm integration tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| integration-test: | |
| runs-on: ubuntu-latest | |
| env: | |
| PGHOST: localhost | |
| PGPORT: 5432 | |
| PGUSER: postgres | |
| PGPASSWORD: password | |
| PGPM_VERSION: 4.33.0 | |
| services: | |
| pg_db: | |
| image: constructiveio/postgres-plus:18 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: password | |
| options: >- | |
| --health-cmd "pg_isready -U postgres" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| minio_cdn: | |
| image: minio/minio:edge-cicd | |
| env: | |
| MINIO_ROOT_USER: minioadmin | |
| MINIO_ROOT_PASSWORD: minioadmin | |
| ports: | |
| - 9000:9000 | |
| - 9001:9001 | |
| options: >- | |
| --health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Configure Git (for tests) | |
| run: | | |
| git config --global user.name "CI Test User" | |
| git config --global user.email "ci@example.com" | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Install | |
| run: pnpm install | |
| - name: Cache pgpm CLI | |
| id: cache-pgpm | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: pgpm-${{ env.PGPM_VERSION }} | |
| - name: Install pgpm CLI globally | |
| run: npm install -g pgpm@${{ env.PGPM_VERSION }} | |
| # Durability is irrelevant for throwaway CI databases. Disabling fsync | |
| # and synchronous commit avoids checkpoint I/O stalls on CI runners. | |
| - name: Tune Postgres for CI (disable durability) | |
| run: pgpm tune --yes | |
| - name: Build | |
| run: pnpm -r build | |
| - name: Seed pg users | |
| run: | | |
| pgpm admin-users bootstrap --yes | |
| - name: Run Integration Tests | |
| run: pgpm test-packages --full-cycle |