55 name : " Check submission"
66 runs-on : ubuntu-latest
77 steps :
8- - name : " Set up Python 3.7 "
8+ - name : " Set up Python 3.11 "
99 uses : actions/setup-python@v1
1010 with :
11- python-version : " 3.7 "
11+ python-version : " 3.11 "
1212
1313 - name : " Checkout pull request"
1414 uses : actions/checkout@v2
3535 - name : " Check submissions"
3636 if : " !contains(steps.commitmsg.outputs.commitmsg, 'skip ci')"
3737 env :
38- CONTRIBUTION_HANDLER_API_KEY : ${{ secrets.CONTRIBUTION_HANDLER_API_KEY }}
38+ HUB_PYGEOAPI_AUTH_TOKEN : ${{ secrets.CONTRIBUTION_HANDLER_API_KEY }}
3939 run : |
4040 set -e
4141 pull_request_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
@@ -45,11 +45,22 @@ jobs:
4545 function trigger_execution() {
4646 notebook_path=$1
4747 echo "Triggering execution of ${notebook_path}"
48- curl --silent \
48+
49+ curl -X POST \
4950 --fail \
51+ -v "https://hub.eox.at/services/eoxhub-gateway/eurodatacube0/pygeoapi" \
5052 --header 'Content-Type: application/json' \
51- --data-raw "{\"notebook_path\": \"${notebook_path}\", \"pull_request_number\": \"${pull_request_number}\"}" \
52- "https://contributions-api.hub.eox.at/notebook-submission-check?api_key=${CONTRIBUTION_HANDLER_API_KEY}"
53+ -H "Authorization: Token ${HUB_PYGEOAPI_AUTH_TOKEN}" \
54+ --data-raw '{"inputs": {
55+ "notebook": "extra/notebook-verification/execute-eurodatacube-from-pr.ipynb",
56+ "cpu_requests": "0.3",
57+ "cpu_limit": "0.3",
58+ "mem_requests": "1G",
59+ "mem_limit": "1G",
60+ "kernel": "python3",
61+ "parameters_json": {"pull_request_number": "${pull_request_number}", "notebook_path_in_repo": "${notebook_path}"}
62+ }}'
63+
5364 if [ $? -ne 0 ] ; then
5465 echo "Notebook execution trigger failed"
5566 exit 1
7384 env :
7485 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7586 with :
76- msg : " I have scheduled automatic execution for all changed notebooks on the EDC cluster . The results should arrive within minutes."
87+ msg : " I have scheduled an automatic execution for all changed notebooks on EOxHub . The results should arrive within minutes."
7788 check_for_duplicate_msg : false
0 commit comments