|
10 | 10 | integration: |
11 | 11 | runs-on: ubuntu-24.04 |
12 | 12 | env: |
| 13 | + ADMIN_PASSWORD: admin_password |
13 | 14 | MYSQL_ROOT_PASSWORD: mysql_root_password |
14 | 15 | timeout-minutes: 30 |
15 | 16 | container: |
@@ -57,11 +58,10 @@ jobs: |
57 | 58 | - name: Check nginx |
58 | 59 | run: curl -v https://localhost/domjudge/ |
59 | 60 | - name: Configure print command |
60 | | - working-directory: submit |
61 | 61 | run: | |
62 | | - curl --fail -u 'admin:password' -X 'GET' 'http://localhost/domjudge/api/v4/config?strict=false' \ |
| 62 | + curl --fail -u "admin:${ADMIN_PASSWORD}" -X 'GET' 'http://localhost/domjudge/api/v4/config?strict=false' \ |
63 | 63 | | jq '.print_command |= "cp [file] /tmp/dj-printfile"' \ |
64 | | - | curl --fail -u 'admin:password' -X 'PUT' -T - 'http://localhost/domjudge/api/v4/config?strict=false' \ |
| 64 | + | curl --fail -u "admin:${ADMIN_PASSWORD}" -X 'PUT' -T - 'http://localhost/domjudge/api/v4/config?strict=false' \ |
65 | 65 | - name: Testing submit client |
66 | 66 | working-directory: submit |
67 | 67 | run: make check-full |
@@ -127,7 +127,7 @@ jobs: |
127 | 127 | # Make an initial request which will get us a session id, and grab the csrf token from it |
128 | 128 | CSRFTOKEN=$(curl $CURLOPTS -c /tmp/cookiejar "http://localhost/domjudge/login" | sed -n 's/.*_csrf_token.*value="\(.*\)".*/\1/p') |
129 | 129 | # Make a second request with our session + csrf token to actually log in |
130 | | - curl $CURLOPTS -c /tmp/cookiejar -F "_csrf_token=$CSRFTOKEN" -F "_username=admin" -F "_password=password" "http://localhost/domjudge/login" |
| 130 | + curl $CURLOPTS -c /tmp/cookiejar -F "_csrf_token=$CSRFTOKEN" -F "_username=admin" -F "_password=${ADMIN_PASSWORD}" "http://localhost/domjudge/login" |
131 | 131 | # Send a general clarification to later test if we see the event. |
132 | 132 | curl $CURLOPTS -F "sendto=" -F "problem=1-" -F "bodytext=Testing" -F "submit=Send" \ |
133 | 133 | "http://localhost/domjudge/jury/clarifications/send" -o /dev/null |
@@ -172,4 +172,4 @@ jobs: |
172 | 172 | export CCS_SPECS_PINNED_SHA1='a68aff54c4e60fc2bff2fc5c36c119bffa4d30f1' |
173 | 173 | ( cd ccs-specs && git reset --hard $CCS_SPECS_PINNED_SHA1 ) |
174 | 174 | export CHECK_API="${HOME}/ccs-specs/check-api.sh -j ${HOME}/yajsv" |
175 | | - $CHECK_API -n -C -e -a 'strict=1' http://admin:password@localhost/domjudge/api |
| 175 | + $CHECK_API -n -C -e -a 'strict=1' "http://admin:${ADMIN_PASSWORD}@localhost/domjudge/api" |
0 commit comments