Skip to content

Commit 0d047b4

Browse files
committed
Clean some unneeded code for GHA
GitLab couldn't push statuses directly but GHA will.
1 parent 358cb10 commit 0d047b4

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
@@ -49,33 +49,8 @@ CNT=0
4949
THRESHOLD=32
5050
if [ $CODECOVERAGE -eq 1 ]; then
5151
CNT=$(sed -n '/Generating code coverage report/,$p' "$ARTIFACTS"/phpunit.out | grep -v DoctrineTestBundle | grep -cv ^$)
52-
FILE=deprecation.txt
53-
sed -n '/Generating code coverage report/,$p' "$ARTIFACTS"/phpunit.out > ${DIR}/$FILE
54-
if [ $CNT -le $THRESHOLD ]; then
55-
STATE=success
56-
else
57-
STATE=failure
58-
fi
59-
ORIGINAL="gitlab.com/DOMjudge"
60-
REPLACETO="domjudge.gitlab.io/-"
61-
# Copied from CCS
62-
curl https://api.github.com/repos/domjudge/domjudge/statuses/$CI_COMMIT_SHA \
63-
-X POST \
64-
-H "Authorization: token $GH_BOT_TOKEN_OBSCURED" \
65-
-H "Accept: application/vnd.github.v3+json" \
66-
-d "{\"state\": \"$STATE\", \"target_url\": \"${CI_JOB_URL/$ORIGINAL/$REPLACETO}/artifacts/$FILE\", \"description\":\"Symfony deprecations ($version)\", \"context\": \"Symfony deprecation ($version)\"}"
67-
fi
68-
if [ $UNITSUCCESS -eq 0 ]; then
69-
STATE=success
70-
else
71-
STATE=failure
7252
fi
7353

74-
curl https://api.github.com/repos/domjudge/domjudge/statuses/$CI_COMMIT_SHA \
75-
-X POST \
76-
-H "Authorization: token $GH_BOT_TOKEN_OBSCURED" \
77-
-H "Accept: application/vnd.github.v3+json" \
78-
-d "{\"state\": \"$STATE\", \"target_url\": \"${CI_PIPELINE_URL}/test_report\", \"description\":\"Unit tests\", \"context\": \"unit_tests ($version)\"}"
7954
if [ $UNITSUCCESS -ne 0 ] || [ $CNT -gt $THRESHOLD ]; then
8055
exit 1
8156
fi

0 commit comments

Comments
 (0)