diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 95a78b0..290e740 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,7 +63,7 @@ jobs: pip install -r requirements.txt - name: Run tests - run: pytest --cov=project --splits 4 --group ${{ matrix.group }} + run: pytest --log-cli-level=DEBUG --cov=project --splits 4 --group ${{ matrix.group }} env: TEST_DATABASE_URL: postgresql://postgres:postgres@localhost/eventcally_tests TEST_REDIS_URL: redis://localhost:6379 diff --git a/doc/deployment.md b/doc/deployment.md index b54711d..9097673 100644 --- a/doc/deployment.md +++ b/doc/deployment.md @@ -27,12 +27,12 @@ psql -c 'create database eventcally;' -U postgres ### Install and run ```sh -python3 -m venv venv -source venv/bin/activate -(venv) pip install -r requirements.txt -(venv) export DATABASE_URL='postgresql://postgres@localhost/eventcally' -(venv) flask db upgrade -(venv) gunicorn -c gunicorn.conf.py project:app +python3 -m venv env +source env/bin/activate +(env) pip install -r requirements.txt +(env) export DATABASE_URL='postgresql://postgres@localhost/eventcally' +(env) flask db upgrade +(env) gunicorn -c gunicorn.conf.py project:app ``` ## Scheduled/Cron jobs diff --git a/tests/conftest.py b/tests/conftest.py index d5f25ac..2c215c8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,4 @@ +import logging import os import warnings @@ -25,6 +26,10 @@ def pytest_generate_tests(metafunc): os.environ["GOOGLE_MAPS_API_KEY"] = "AIzaDummy" os.environ["TESTING"] = "1" + logging.getLogger().info("pytest_generate_tests") + logging.getLogger().info(os.environ["DATABASE_URL"]) + logging.getLogger().info(os.environ["TEST_DATABASE_URL"]) + @pytest.fixture def app(): @@ -48,6 +53,9 @@ def db(app): with app.app_context(): db.drop_all() db.create_all() + logging.getLogger().info("fixture-db") + logging.getLogger().info(os.environ["DATABASE_URL"]) + logging.getLogger().info(os.environ["TEST_DATABASE_URL"]) stamp() create_initial_data()