|
| 1 | +name: Schedule tests |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + |
| 6 | +concurrency: |
| 7 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 8 | + cancel-in-progress: true |
| 9 | + |
| 10 | +permissions: |
| 11 | + contents: read |
| 12 | + |
| 13 | +jobs: |
| 14 | + windows: |
| 15 | + runs-on: windows-latest |
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + python-version: |
| 19 | + - '3.12' |
| 20 | + - '3.13' |
| 21 | + - '3.14-dev' |
| 22 | + name: Windows, SQLite, Python ${{ matrix.python-version }} |
| 23 | + continue-on-error: true |
| 24 | + steps: |
| 25 | + - name: Checkout |
| 26 | + uses: actions/checkout@v4 |
| 27 | + - name: Set up Python |
| 28 | + uses: actions/setup-python@v5 |
| 29 | + with: |
| 30 | + python-version: ${{ matrix.python-version }} |
| 31 | + - name: Install poetry |
| 32 | + uses: abatilo/actions-poetry@v3 |
| 33 | + |
| 34 | + - name: Install and upgrade packaging tools |
| 35 | + run: poetry install --no-interaction --all-extras --with dev |
| 36 | + - name: Run tests |
| 37 | + run: poetry run python -Wall tests/runtests.py -v2 |
| 38 | + |
| 39 | + postgresql: |
| 40 | + strategy: |
| 41 | + fail-fast: false |
| 42 | + matrix: |
| 43 | + version: [16, 17] |
| 44 | + server_side_bindings: [0, 1] |
| 45 | + runs-on: ubuntu-latest |
| 46 | + name: PostgreSQL Versions |
| 47 | + env: |
| 48 | + SERVER_SIDE_BINDING: ${{ matrix.server_side_bindings }} |
| 49 | + services: |
| 50 | + postgres: |
| 51 | + image: postgres:${{ matrix.version }}-alpine |
| 52 | + env: |
| 53 | + POSTGRES_DB: django |
| 54 | + POSTGRES_USER: user |
| 55 | + POSTGRES_PASSWORD: postgres |
| 56 | + ports: |
| 57 | + - 5432:5432 |
| 58 | + options: >- |
| 59 | + --health-cmd pg_isready |
| 60 | + --health-interval 10s |
| 61 | + --health-timeout 5s |
| 62 | + --health-retries 5 |
| 63 | + steps: |
| 64 | + - name: Checkout |
| 65 | + uses: actions/checkout@v4 |
| 66 | + - name: Set up Python |
| 67 | + uses: actions/setup-python@v5 |
| 68 | + with: |
| 69 | + python-version: '3.13' |
| 70 | + - name: Install poetry |
| 71 | + uses: abatilo/actions-poetry@v3 |
| 72 | + - name: Install and upgrade packaging tools |
| 73 | + run: poetry install --no-interaction --all-extras --with dev |
| 74 | + - name: Create PostgreSQL settings file |
| 75 | + run: mv ./.github/workflows/data/test_postgres.py.tpl ./tests/test_postgres.py |
| 76 | + - name: Run tests |
| 77 | + working-directory: ./tests/ |
| 78 | + run: poetry python -Wall runtests.py --settings=test_postgres --verbosity=2 |
0 commit comments