Library updates #432

This commit is contained in:
Daniel Grams 2023-04-16 18:13:47 +02:00
parent d8212ed73f
commit b20e317623
3 changed files with 15 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -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()