Locally, the pytest --pg-extension-postgis command works fine, but when running the command via CircleCI config, I get the following error:
../miniconda/envs/test/lib/python3.8/site-packages/sqlalchemy/engine/base.py:1283:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x7f70ac219d00>
cursor = <cursor object at 0x7f7105d5c4f0; closed: -1>
statement = 'BEGIN TRANSACTION; CREATE EXTENSION IF NOT EXISTS "postgis"; COMMIT;'
parameters = {}
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x7f7105d01e20>
def do_execute(self, cursor, statement, parameters, context=None):
> cursor.execute(statement, parameters)
E psycopg2.errors.UndefinedFile: could not open extension control file "/home/circleci/miniconda/envs/test/share/extension/postgis.control": No such file or directory
../miniconda/envs/test/lib/python3.8/site-packages/sqlalchemy/engine/default.py:590: UndefinedFile
It seems to be caused by my CircleCI directory path, but I am having troubles looking into this deeper without being able to do it locally (it's on the CircleCI server instead). In other words, why isn't "postgis.control" file in /home/circleci/miniconda/envs/test/share/extension/?
The tests run and pass just fine when I remove the --pg-extensions option. Is the best option just to install the extensions via postgresql_db.install_extension('postgis')?
--pg-extensions appear not to work with CircleCI.
Locally, the
pytest --pg-extension-postgis
command works fine, but when running the command via CircleCI config, I get the following error:It seems to be caused by my CircleCI directory path, but I am having troubles looking into this deeper without being able to do it locally (it's on the CircleCI server instead). In other words, why isn't "postgis.control" file in /home/circleci/miniconda/envs/test/share/extension/?
The tests run and pass just fine when I remove the
--pg-extensions
option. Is the best option just to install the extensions viapostgresql_db.install_extension('postgis')
?Here is my CircelCi config.yml: