mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-14 04:56:33 +03:00
5d19c6ef7e
Drop Python version not supported on master. Drop Travis workflow on master branch too.
63 lines
1.4 KiB
YAML
63 lines
1.4 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
tests:
|
|
name: Unit tests run
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- python: 3.6
|
|
postgres: 10
|
|
- python: 3.7
|
|
postgres: 11
|
|
- python: 3.8
|
|
postgres: 12
|
|
- python: 3.9
|
|
postgres: 13
|
|
|
|
# Opposite extremes of the supported Py/PG range, other architecture
|
|
- python: 3.6
|
|
postgres: 13
|
|
architecture: 'x86'
|
|
- python: 3.9
|
|
postgres: 9.5
|
|
architecture: 'x86'
|
|
|
|
env:
|
|
PSYCOPG2_TESTDB: postgres
|
|
PSYCOPG2_TESTDB_HOST: 127.0.0.1
|
|
PSYCOPG2_TESTDB_USER: postgres
|
|
PSYCOPG2_TESTDB_PASSWORD: password
|
|
|
|
services:
|
|
postgresql:
|
|
image: postgres:${{ matrix.postgres }}
|
|
env:
|
|
POSTGRES_PASSWORD: password
|
|
ports:
|
|
- 5432:5432
|
|
# Set health checks to wait until postgres has started
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python }}
|
|
- name: Install tox
|
|
run: pip install tox
|
|
- name: Run tests
|
|
run: tox -e ${{ matrix.python }}
|
|
timeout-minutes: 5
|