forked from cms-dev/cms
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.test.yml
33 lines (31 loc) · 1.03 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
version: "3.3"
services:
testdb:
image: postgres
environment:
POSTGRES_HOST_AUTH_METHOD: trust
testcms:
build: .
depends_on:
- "testdb"
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 testdb:5432 -- sh -c "
dropdb --host=testdb --username=postgres cmsdbfortesting ;
createdb --host=testdb --username=postgres cmsdbfortesting ;
cmsInitDB ;
sudo chown cmsuser:cmsuser ./codecov ;
pytest --cov . --cov-report xml:codecov/unittests.xml ;
dropdb --host=testdb --username=postgres cmsdbfortesting ;
createdb --host=testdb --username=postgres cmsdbfortesting ;
cmsInitDB ;
cmsRunFunctionalTests -v --coverage codecov/functionaltests.xml ;
"