Run unit tests on CI with postgres

This commit is contained in:
Bastien Abadie 2023-07-05 16:43:31 +02:00 коммит произвёл Sebastian Hengst
Родитель f17959022e
Коммит 1e0d51a410
2 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -67,6 +67,7 @@ jobs:
pip install --upgrade pip pip install --upgrade pip
pip install tox pip install tox
tox -e docker tox -e docker
tox -e docker-postgres
- codecov/upload - codecov/upload
test-docker-build: test-docker-build:

Просмотреть файл

@ -49,5 +49,13 @@ commands_pre =
commands = commands =
docker-compose run -e TREEHERDER_DEBUG=False backend bash -c "pytest --cov --cov-report=xml tests/ --runslow -p no:unraisableexception" docker-compose run -e TREEHERDER_DEBUG=False backend bash -c "pytest --cov --cov-report=xml tests/ --runslow -p no:unraisableexception"
[testenv:docker-postgres]
whitelist_externals=
docker-compose
commands_pre =
docker-compose build
commands =
docker-compose run -e TREEHERDER_DEBUG=False -e DATABASE_URL=psql://postgres:mozilla1234@localhost/treeherder backend bash -c "pytest --cov --cov-report=xml tests/ --runslow -p no:unraisableexception"
[flake8] [flake8]
per-file-ignores = treeherder/model/models.py:E402 per-file-ignores = treeherder/model/models.py:E402