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
@@ -35,21 +35,30 @@ jobs:
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")
4242
43- exit 0
44-
4543 function trigger_execution() {
4644 notebook_path=$1
4745 echo "Triggering execution of ${notebook_path}"
48- curl --silent \
46+
47+ curl -X POST \
4948 --fail \
49+ -v "https://hub.eox.at/services/eoxhub-gateway/eurodatacube0/pygeoapi" \
5050 --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}"
51+ -H "Authorization: Token ${HUB_PYGEOAPI_AUTH_TOKEN}" \
52+ --data-raw '{"inputs": {
53+ "notebook": "extra/notebook-verification/execute-eurodatacube-from-pr.ipynb",
54+ "cpu_requests": "0.3",
55+ "cpu_limit": "0.3",
56+ "mem_requests": "1G",
57+ "mem_limit": "1G",
58+ "kernel": "python3",
59+ "parameters_json": {"pull_request_number": "${pull_request_number}", "notebook_path_in_repo": "${notebook_path}"}
60+ }}'
61+
5362 if [ $? -ne 0 ] ; then
5463 echo "Notebook execution trigger failed"
5564 exit 1
7382 env :
7483 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7584 with :
76- msg : " I have scheduled automatic execution for all changed notebooks on the EDC cluster . The results should arrive within minutes."
85+ msg : " I have scheduled an automatic execution for all changed notebooks on EOxHub . The results should arrive within minutes."
7786 check_for_duplicate_msg : false
0 commit comments