mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 00:07:22 +00:00
Library updates #432
This commit is contained in:
parent
d8212ed73f
commit
b20e317623
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user