3838php $phpcov webapp/bin/phpunit -c webapp/phpunit.xml.dist webapp/tests/$unittest --log-junit ${DIR} /unit-tests.xml --colors=never $pcov > " $ARTIFACTS " /phpunit.out
3939UNITSUCCESS=$?
4040set -e
41-
42- # Exit early for now, just for testing
43- exit 0
41+ cp webapp/var/log/test.log " $ARTIFACTS " /test.log
4442
4543CNT=0
4644if [ $CODECOVERAGE -eq 1 ]; then
@@ -52,36 +50,17 @@ if [ $CODECOVERAGE -eq 1 ]; then
5250 else
5351 STATE=failure
5452 fi
55- ORIGINAL=" gitlab.com/DOMjudge"
56- REPLACETO=" domjudge.gitlab.io/-"
57- # Copied from CCS
58- curl https://api.github.com/repos/domjudge/domjudge/statuses/$CI_COMMIT_SHA \
59- -X POST \
60- -H " Authorization: token $GH_BOT_TOKEN_OBSCURED " \
61- -H " Accept: application/vnd.github.v3+json" \
62- -d " {\" state\" : \" $STATE \" , \" target_url\" : \" ${CI_JOB_URL/ $ORIGINAL / $REPLACETO } /artifacts/$FILE \" , \" description\" :\" Symfony deprecations\" , \" context\" : \" Symfony deprecation\" }"
6353fi
64- if [ $UNITSUCCESS -eq 0 ]; then
65- STATE=success
66- else
67- STATE=failure
68- fi
69- cp webapp/var/log/test.log " $ARTIFACTS " /test.log
7054
71- curl https://api.github.com/repos/domjudge/domjudge/statuses/$CI_COMMIT_SHA \
72- -X POST \
73- -H " Authorization: token $GH_BOT_TOKEN_OBSCURED " \
74- -H " Accept: application/vnd.github.v3+json" \
75- -d " {\" state\" : \" $STATE \" , \" target_url\" : \" ${CI_PIPELINE_URL} /test_report\" , \" description\" :\" Unit tests\" , \" context\" : \" unit_tests ($version )\" }"
7655if [ $UNITSUCCESS -ne 0 ]; then
7756 exit 1
7857fi
7958
8059if [ $CODECOVERAGE -eq 1 ]; then
81- section_start_collap uploadcoverage " Upload code coverage"
60+ section_start " Upload code coverage"
8261 # Only upload when we got working unit-tests.
8362 set +u # Uses some variables which are not set
8463 # shellcheck disable=SC1090
8564 . $DIR /.github/jobs/uploadcodecov.sh 1> /dev/zero 2> /dev/zero
86- section_end uploadcoverage
65+ section_end
8766fi
0 commit comments