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 22
33. .github/jobs/ci_settings.sh
44
5+ DIR=" $PWD "
6+
57export version=$1
68unittest=$2
79[ " $version " = " 8.1" ] && CODECOVERAGE=1 || CODECOVERAGE=0
@@ -29,18 +31,18 @@ pcov=""
2931phpcov=" "
3032if [ " $CODECOVERAGE " -eq 1 ]; then
3133 phpcov=" -dpcov.enabled=1 -dpcov.directory=webapp/src"
32- pcov=" --coverage-html=${CI_PROJECT_DIR } /coverage-html --coverage-clover coverage.xml"
34+ pcov=" --coverage-html=${DIR } /coverage-html --coverage-clover coverage.xml"
3335fi
3436set +e
35- 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
37+ 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
3638UNITSUCCESS=$?
3739set -e
3840CNT=0
3941THRESHOLD=32
4042if [ $CODECOVERAGE -eq 1 ]; then
4143 CNT=$( sed -n ' /Generating code coverage report/,$p' " $GITLABARTIFACTS " /phpunit.out | grep -v DoctrineTestBundle | grep -cv ^$)
4244 FILE=deprecation.txt
43- sed -n ' /Generating code coverage report/,$p' " $GITLABARTIFACTS " /phpunit.out > ${CI_PROJECT_DIR } /$FILE
45+ sed -n ' /Generating code coverage report/,$p' " $GITLABARTIFACTS " /phpunit.out > ${DIR } /$FILE
4446 if [ $CNT -le $THRESHOLD ]; then
4547 STATE=success
4648 else
You can’t perform that action at this time.
0 commit comments