Skip to content

Commit e655a8b

Browse files
committed
Rename as we don't have the GITLAB environment variables anymore
1 parent ec72d16 commit e655a8b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/jobs/unit-tests.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
. .github/jobs/ci_settings.sh
44

5+
DIR="$PWD"
6+
57
export version=$1
68
unittest=$2
79
[ "$version" = "8.1" ] && CODECOVERAGE=1 || CODECOVERAGE=0
@@ -28,18 +30,18 @@ pcov=""
2830
phpcov=""
2931
if [ "$CODECOVERAGE" -eq 1 ]; then
3032
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"
3234
fi
3335
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
3537
UNITSUCCESS=$?
3638
set -e
3739
CNT=0
3840
THRESHOLD=32
3941
if [ $CODECOVERAGE -eq 1 ]; then
4042
CNT=$(sed -n '/Generating code coverage report/,$p' "$GITLABARTIFACTS"/phpunit.out | grep -v DoctrineTestBundle | grep -cv ^$)
4143
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
4345
if [ $CNT -le $THRESHOLD ]; then
4446
STATE=success
4547
else

0 commit comments

Comments
 (0)