Skip to content

Commit fa0503f

Browse files
author
Michael Vasseur
committed
Should work?
1 parent 0de05da commit fa0503f

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

.github/jobs/unit-tests.sh

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ set +e
3838
php $phpcov webapp/bin/phpunit -c webapp/phpunit.xml.dist webapp/tests/$unittest --log-junit ${DIR}/unit-tests.xml --colors=never $pcov > "$ARTIFACTS"/phpunit.out
3939
UNITSUCCESS=$?
4040
set -e
41-
42-
# Exit early for now, just for testing
43-
exit 0
41+
cp webapp/var/log/test.log "$ARTIFACTS"/test.log
4442

4543
CNT=0
4644
if [ $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\"}"
6353
fi
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)\"}"
7655
if [ $UNITSUCCESS -ne 0 ]; then
7756
exit 1
7857
fi
7958

8059
if [ $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
8766
fi

0 commit comments

Comments
 (0)