File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
. .github/jobs/ci_settings.sh
4
4
5
+ DIR=" $PWD "
6
+
5
7
export version=$1
6
8
unittest=$2
7
9
[ " $version " = " 8.1" ] && CODECOVERAGE=1 || CODECOVERAGE=0
@@ -28,18 +30,18 @@ pcov=""
28
30
phpcov=" "
29
31
if [ " $CODECOVERAGE " -eq 1 ]; then
30
32
phpcov=" -dpcov.enabled=1 -dpcov.directory=webapp/src"
31
- pcov=" --coverage-html=${CI_PROJECT_DIR } /coverage-html --coverage-clover coverage.xml"
33
+ pcov=" --coverage-html=${DIR } /coverage-html --coverage-clover coverage.xml"
32
34
fi
33
35
set +e
34
- php $phpcov webapp/bin/phpunit -c webapp/phpunit.xml.dist webapp/tests/$unittest --log-junit ${CI_PROJECT_DIR } /unit-tests.xml --colors=never $pcov > " $GITLABARTIFACTS " /phpunit.out
36
+ php $phpcov webapp/bin/phpunit -c webapp/phpunit.xml.dist webapp/tests/$unittest --log-junit ${DIR } /unit-tests.xml --colors=never $pcov > " $GITLABARTIFACTS " /phpunit.out
35
37
UNITSUCCESS=$?
36
38
set -e
37
39
CNT=0
38
40
THRESHOLD=32
39
41
if [ $CODECOVERAGE -eq 1 ]; then
40
42
CNT=$( sed -n ' /Generating code coverage report/,$p' " $GITLABARTIFACTS " /phpunit.out | grep -v DoctrineTestBundle | grep -cv ^$)
41
43
FILE=deprecation.txt
42
- sed -n ' /Generating code coverage report/,$p' " $GITLABARTIFACTS " /phpunit.out > ${CI_PROJECT_DIR } /$FILE
44
+ sed -n ' /Generating code coverage report/,$p' " $GITLABARTIFACTS " /phpunit.out > ${DIR } /$FILE
43
45
if [ $CNT -le $THRESHOLD ]; then
44
46
STATE=success
45
47
else
You can’t perform that action at this time.
0 commit comments