forked from cms-dev/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.test.yml
35 lines (33 loc) · 1.12 KB
/
docker-compose.test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
version: "3.3"
services:
cms_test_db:
container_name: cms_test_db
image: postgres
environment:
POSTGRES_HOST_AUTH_METHOD: trust
cms_test:
container_name: cms_test
build: .
depends_on:
- "cms_test_db"
environment:
CMS_CONFIG: /usr/local/etc/cms-testdb.conf
# Could be removed in the future, see:
# - https://github.com/pytest-dev/pytest/issues/7443
# - https://github.com/actions/runner/issues/241
PYTEST_ADDOPTS: --color=yes
volumes:
- "./codecov:/home/cmsuser/cms/codecov"
privileged: true
command: >
wait-for-it cms_test_db:5432 -- sh -c "
dropdb --host=cms_test_db --username=postgres cmsdbfortesting ;
createdb --host=cms_test_db --username=postgres cmsdbfortesting ;
cmsInitDB ;
sudo chown cmsuser:cmsuser ./codecov ;
pytest --cov . --cov-report xml:codecov/unittests.xml ;
dropdb --host=cms_test_db --username=postgres cmsdbfortesting ;
createdb --host=cms_test_db --username=postgres cmsdbfortesting ;
cmsInitDB ;
cmsRunFunctionalTests -v --coverage codecov/functionaltests.xml ;
"