Skip to content

Commit 838b561

Browse files
committed
Run all unit tests coverage
1 parent e3fa369 commit 838b561

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/jobs/unit-tests.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,17 @@ fi
3737
set +e
3838
php $phpcov webapp/bin/phpunit -c webapp/phpunit.xml.dist webapp/tests/$unittest --log-junit "$ARTIFACTS"/unit-tests.xml --colors=never $pcov > "$ARTIFACTS"/phpunit.out
3939
UNITSUCCESS=$?
40+
41+
# Make sure the log exists before copy
42+
touch ${DIR}/webapp/var/log/test.log
43+
cp ${DIR}/webapp/var/log/test.log "$ARTIFACTS"/test.log
44+
4045
set -e
4146
CNT=0
4247
THRESHOLD=32
4348
if [ $CODECOVERAGE -eq 1 ]; then
4449
CNT=$(sed -n '/Generating code coverage report/,$p' "$ARTIFACTS"/phpunit.out | grep -v DoctrineTestBundle | grep -cv ^$)
4550
fi
46-
cp webapp/var/log/test.log "$ARTIFACTS"/test.log
4751

4852
if [ $UNITSUCCESS -ne 0 ] || [ $CNT -gt $THRESHOLD ]; then
4953
exit 1
@@ -54,6 +58,6 @@ if [ $CODECOVERAGE -eq 1 ]; then
5458
# Only upload when we got working unit-tests.
5559
set +u # Uses some variables which are not set
5660
# shellcheck disable=SC1090
57-
. $DIR/.github/jobs/uploadcodecov.sh 1>/dev/zero 2>/dev/zero
61+
. $DIR/.github/jobs/uploadcodecov.sh &>> "$ARTIFACTS"/codecov.log
5862
section_end
5963
fi

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ jobs:
5757
if: ${{ !cancelled() }}
5858
with:
5959
files: |
60-
/tmp/artifacts/unit-tests.xml
60+
unit-tests.xml

0 commit comments

Comments
 (0)