File: postgres.yaml

package info (click to toggle)
python-django-pgschemas 1.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 848 kB
  • sloc: python: 3,887; makefile: 33; sh: 10; sql: 2
file content (42 lines) | stat: -rw-r--r-- 1,191 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: postgres
on:
  pull_request:
  push:
    branches:
      - master
    paths:
      - pyproject.toml
      - poetry.lock
      - "**.py"
jobs:
  postgres-version:
    runs-on: ubuntu-latest
    strategy:
      max-parallel: 4
      matrix:
        postgres-version: [13, 14, 15, 16, 17]
        psycopg-version: ["psycopg", "psycopg2"]
    services:
      postgres:
        image: postgres:${{ matrix.postgres-version }}
        env:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres
          POSTGRES_DB: sandbox
        ports:
          - 5432:5432
        options: --name postgres --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
    steps:
      - uses: actions/checkout@v3
      - name: Install poetry
        run: pipx install poetry
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: "3.x"
      - name: Install Dependencies
        run: poetry install
      - name: Install psycopg specific version ${{ matrix.psycopg-version }}
        run: poetry run pip install ${{ matrix.psycopg-version }}
      - name: Run Tests
        run: poetry run pytest sandbox/tests