PSYCOPG_TEST_DSN: "host=127.0.0.1 user=postgres"
PGPASSWORD: password
PYTEST_ADDOPTS: --color yes
+ # Enable to run tests using the minumum version of dependencies.
+ # PIP_CONSTRAINT: ${{ github.workspace }}/tests/constraints.txt
steps:
- uses: actions/checkout@v2
# Don't run timing-based tests as they regularly fail.
# pproxy-based tests fail too, with the proxy not coming up in 2s.
PYTEST_ADDOPTS: -m 'not timing and not proxy and not mypy' --color yes
+ # PIP_CONSTRAINT: ${{ github.workspace }}/tests/constraints.txt
steps:
- uses: actions/checkout@v2
PSYCOPG_TEST_DSN: "host=127.0.0.1 dbname=postgres"
# On windows pproxy doesn't seem very happy. Also a few timing test fail.
PYTEST_ADDOPTS: -m 'not timing and not proxy and not mypy' --color yes
+ # PIP_CONSTRAINT: ${{ github.workspace }}/tests/constraints.txt
steps:
- uses: actions/checkout@v2
-python -bb -m pytest {posargs}
-python -bb -m pytest --lf --lfnf=none --no-collect-ok {posargs}
python -bb -m pytest --lf --lfnf=none --no-collect-ok {posargs}
-passenv = PG* PSYCOPG_TEST_DSN PYTEST_ADDOPTS PSYCOPG_IMPL
+passenv = PG* PSYCOPG_TEST_DSN PYTEST_ADDOPTS PSYCOPG_IMPL PIP_CONSTRAINT
extras = test
deps =
-e {toxinidir}/../psycopg_pool
[testenv:dns]
-changedir = ..
-commands =
- -python -bb -m pytest {posargs}
- -python -bb -m pytest --lf --lfnf=none --no-collect-ok {posargs}
- python -bb -m pytest --lf --lfnf=none --no-collect-ok {posargs}
-passenv = PG* PSYCOPG_TEST_DSN PYTEST_ADDOPTS PSYCOPG_IMPL
-extras = test
deps =
dnspython
[testenv:postgis]
-changedir = ..
-commands =
- -python -bb -m pytest {posargs}
- -python -bb -m pytest --lf --lfnf=none --no-collect-ok {posargs}
- python -bb -m pytest --lf --lfnf=none --no-collect-ok {posargs}
-passenv = PG* PSYCOPG_TEST_DSN PYTEST_ADDOPTS PSYCOPG_IMPL
-extras = test
deps =
shapely
-python -bb -m pytest {posargs}
-python -bb -m pytest --lf --lfnf=none --no-collect-ok {posargs}
python -bb -m pytest --lf --lfnf=none --no-collect-ok {posargs}
-passenv = PG* PSYCOPG_TEST_DSN PYTEST_ADDOPTS PSYCOPG_IMPL
+passenv = PG* PSYCOPG_TEST_DSN PYTEST_ADDOPTS PSYCOPG_IMPL PIP_CONSTRAINT
deps =
-e {toxinidir}/../psycopg[test]
-e {toxinidir}/../psycopg_pool
envlist = black, flake8, mypy
isolated_build = True
+[testenv]
+passenv = PIP_CONSTRAINT
+skip_install = true
+
[testenv:black]
commands = black --check --diff .
-deps = -e psycopg[dev]
-skip_install = true
+deps =
+ -e psycopg[dev]
[testenv:flake8]
commands = flake8
-deps = -e psycopg[dev]
-skip_install = true
+deps =
+ -e psycopg[dev]
[testenv:mypy]
commands = mypy
-deps = -e psycopg[dev,test]
-skip_install = true
+deps =
+ -e psycopg[dev,test]
[testenv:docs]
commands = sphinx-build -W -T -b html docs docs/_build/html
deps =
./psycopg[docs]
./psycopg_pool
-skip_install = true
[flake8]
max-line-length = 85