Merge pull request #12 from constructive-io/feat/compose-diff-examples #31
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: acceptance | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| PGPM_VERSION: 5.21.0 | |
| jobs: | |
| acceptance: | |
| runs-on: ubuntu-latest | |
| env: | |
| PGHOST: localhost | |
| PGPORT: 5432 | |
| PGUSER: postgres | |
| PGPASSWORD: password | |
| services: | |
| pg_db: | |
| image: constructiveio/postgres-plus:18 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: password | |
| options: >- | |
| --health-cmd "pg_isready -U postgres" | |
| --health-interval 3s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| ports: | |
| - 5432:5432 | |
| 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@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| - name: Install | |
| run: pnpm install | |
| - name: Cache pgpm CLI | |
| 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. | |
| - name: Tune Postgres for CI (disable durability) | |
| run: pgpm tune --yes | |
| # The catalog-equivalence check needs a pg_dump matching the server major. | |
| - name: Install postgresql-client-18 | |
| run: | | |
| sudo install -d /usr/share/postgresql-common/pgdg | |
| sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | |
| echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list | |
| sudo apt-get update -qq | |
| sudo apt-get install -y -qq postgresql-client-18 | |
| echo "PG_DUMP=/usr/lib/postgresql/18/bin/pg_dump" >> "$GITHUB_ENV" | |
| echo "/usr/lib/postgresql/18/bin" >> "$GITHUB_PATH" | |
| - name: Seed pg and app_user | |
| run: | | |
| pgpm admin-users bootstrap --yes | |
| pgpm admin-users add --test --yes | |
| - name: Run acceptance suite | |
| run: bash scripts/acceptance.sh |