env:
PSYCOPG_IMPL: python
- PGHOST: 127.0.0.1
- PGUSER: postgres
+ PSYCOPG_TEST_DSN: "host=127.0.0.1 user=postgres"
PGPASSWORD: password
- PSYCOPG_TEST_DSN: "dbname=postgres"
services:
postgresql:
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 -c psycopg -e ${{ matrix.python }} -- --color yes
env:
PSYCOPG_IMPL: c
- PGHOST: 127.0.0.1
- PGUSER: postgres
+ PSYCOPG_TEST_DSN: "host=127.0.0.1 user=postgres"
PGPASSWORD: password
- PSYCOPG_TEST_DSN: "dbname=postgres"
# skip tests failing on importing psycopg_c.pq on subprocess
# they only fail on Travis, work ok locally under tox too.
PYTEST_ADDOPTS: "-m 'not subprocess'"
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 -c psycopg_c -e ${{ matrix.python }} -- --color yes
+
+ test-macos:
+ name: C implementation on MacOS
+ runs-on: macos-10.15
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - python: 3.6
+ - python: 3.7
+ - python: 3.8
+ - python: 3.9
+
+ env:
+ PSYCOPG_IMPL: c
+ PSYCOPG_TEST_DSN: "host=127.0.0.1 user=runner dbname=postgres"
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: install PostgreSQL on the runner
+ run: brew install postgresql@13
+
+ - name: start PostgreSQL service for test
+ run: brew services start postgresql
+ # Note: race condition, we expect the service will be up after build
+
+ - uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python }}
+
+ - name: Install tox
+ run: pip install tox
+
- name: Run tests
run: tox -c psycopg_c -e ${{ matrix.python }} -- --color yes