Skip to content

Commit 30160e7

Browse files
committed
Gather logs close to the unit tests
1 parent ad9665f commit 30160e7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/jobs/unit-tests.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ set +e
3636
echo "unused:sqlserver:domjudge:domjudge:domjudge:3306" > /opt/domjudge/domserver/etc/dbpasswords.secret
3737
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
3838
UNITSUCCESS=$?
39+
40+
# Make sure the log exists before copy
41+
touch ${DIR}/webapp/var/log/test.log
42+
cp ${DIR}/webapp/var/log/*.log "$ARTIFACTS"/
43+
3944
set -e
4045
CNT=0
4146
THRESHOLD=32
@@ -62,7 +67,6 @@ if [ $UNITSUCCESS -eq 0 ]; then
6267
else
6368
STATE=failure
6469
fi
65-
cp webapp/var/log/test.log "$ARTIFACTS"/test.log
6670

6771
curl https://api.github.com/repos/domjudge/domjudge/statuses/$CI_COMMIT_SHA \
6872
-X POST \

0 commit comments

Comments
 (0)