Skip to content

Commit 49d4452

Browse files
committed
Clean some unneeded code for GHA
GitLab couldn't push statuses directly but GHA will.
1 parent 507fe95 commit 49d4452

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

.github/jobs/unit-tests.sh

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,33 +46,8 @@ CNT=0
4646
THRESHOLD=32
4747
if [ $CODECOVERAGE -eq 1 ]; then
4848
CNT=$(sed -n '/Generating code coverage report/,$p' "$ARTIFACTS"/phpunit.out | grep -v DoctrineTestBundle | grep -cv ^$)
49-
FILE=deprecation.txt
50-
sed -n '/Generating code coverage report/,$p' "$ARTIFACTS"/phpunit.out > ${DIR}/$FILE
51-
if [ $CNT -le $THRESHOLD ]; then
52-
STATE=success
53-
else
54-
STATE=failure
55-
fi
56-
ORIGINAL="gitlab.com/DOMjudge"
57-
REPLACETO="domjudge.gitlab.io/-"
58-
# Copied from CCS
59-
curl https://api.github.com/repos/domjudge/domjudge/statuses/$CI_COMMIT_SHA \
60-
-X POST \
61-
-H "Authorization: token $GH_BOT_TOKEN_OBSCURED" \
62-
-H "Accept: application/vnd.github.v3+json" \
63-
-d "{\"state\": \"$STATE\", \"target_url\": \"${CI_JOB_URL/$ORIGINAL/$REPLACETO}/artifacts/$FILE\", \"description\":\"Symfony deprecations ($version)\", \"context\": \"Symfony deprecation ($version)\"}"
64-
fi
65-
if [ $UNITSUCCESS -eq 0 ]; then
66-
STATE=success
67-
else
68-
STATE=failure
6949
fi
7050

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)\"}"
7651
if [ $UNITSUCCESS -ne 0 ] || [ $CNT -gt $THRESHOLD ]; then
7752
exit 1
7853
fi

0 commit comments

Comments
 (0)