Skip to content

Example configuration for python + postgresql with CircleCI

Notifications You must be signed in to change notification settings

pbedn/circleci-2.0-pytest-postgresql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

circleci-2.0-pytest-postgresql

CircleCI

Example configuration for python + postgresql with CircleCI


Current setup creates database schema running command in .circleci/config.yml

- run:
    name: Setup the database
    command: psql -h localhost -p 5432 -U ubuntu -d circle_test -a -f schema.sql

Other possibility could be to do it from python, just uncomment line setup_database(cur) and remove one from circleci config to prevent error.

# test_database.py
@pytest.fixture(scope="module")
def db():
    con, cur = connect_to_db(DATABASE)
    # setup_database(cur)
    yield con, cur
    con.close()

About

Example configuration for python + postgresql with CircleCI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published