File tree Expand file tree Collapse file tree 2 files changed +29
-12
lines changed
Expand file tree Collapse file tree 2 files changed +29
-12
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ sudo chown cmsuser:cmsuser ./codecov
4+
5+ dropdb --host=testdb --username=postgres cmsdbfortesting
6+ createdb --host=testdb --username=postgres cmsdbfortesting
7+ cmsInitDB
8+
9+ pytest --cov . --cov-report xml:codecov/unittests.xml
10+ UNIT=$?
11+
12+ dropdb --host=testdb --username=postgres cmsdbfortesting
13+ createdb --host=testdb --username=postgres cmsdbfortesting
14+ cmsInitDB
15+
16+ cmsRunFunctionalTests -v --coverage codecov/functionaltests.xml
17+ FUNC=$?
18+
19+ # This check is needed because otherwise failing unit tests aren't reported in
20+ # the CI as long as the functional tests are passing. Ideally we should get rid
21+ # of `cmsRunFunctionalTests` and make those tests work with pytest so they can
22+ # be auto-discovered and run in a single command.
23+ if [ $UNIT -ne 0 ] || [ $FUNC -ne 0 ]
24+ then
25+ exit 1
26+ else
27+ exit 0
28+ fi
Original file line number Diff line number Diff line change @@ -18,15 +18,4 @@ services:
1818 - " ./codecov:/home/cmsuser/cms/codecov"
1919 privileged : true
2020 cgroup : host
21- command : >
22- wait-for-it testdb:5432 -- sh -c "
23- dropdb --host=testdb --username=postgres cmsdbfortesting ;
24- createdb --host=testdb --username=postgres cmsdbfortesting ;
25- cmsInitDB ;
26- sudo chown cmsuser:cmsuser ./codecov ;
27- pytest --cov . --cov-report xml:codecov/unittests.xml ;
28- dropdb --host=testdb --username=postgres cmsdbfortesting ;
29- createdb --host=testdb --username=postgres cmsdbfortesting ;
30- cmsInitDB ;
31- cmsRunFunctionalTests -v --coverage codecov/functionaltests.xml ;
32- "
21+ command : wait-for-it testdb:5432 -- ./_cms-test-internal.sh
You can’t perform that action at this time.
0 commit comments