updates #17
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 | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-pgpm-tests | |
| cancel-in-progress: true | |
| env: | |
| PGPM_VERSION: '2.7.9' | |
| jobs: | |
| test-pgpm: | |
| runs-on: ubuntu-latest | |
| env: | |
| PGHOST: localhost | |
| PGPORT: 5432 | |
| PGUSER: postgres | |
| PGPASSWORD: password | |
| services: | |
| pg_db: | |
| image: ghcr.io/constructive-io/docker/postgres-plus:17 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: password | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Cache pgpm CLI | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: pgpm-${{ runner.os }}-${{ env.PGPM_VERSION }} | |
| - name: Install pgpm CLI globally | |
| run: npm install -g pgpm@${{ env.PGPM_VERSION }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: latest | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: Install Python dependencies | |
| run: poetry install | |
| - name: Install @pgpm/faker in test fixture | |
| run: | | |
| cd tests/fixtures/pgpm-workspace/packages/test-module | |
| pgpm install @pgpm/faker | |
| - name: Seed pg and app_user | |
| run: | | |
| pgpm admin-users bootstrap --yes | |
| pgpm admin-users add --test --yes | |
| - name: Run pgpm integration tests | |
| run: poetry run pytest tests/test_pgpm_integration.py -v -s --log-cli-level=INFO |