diff --git a/.github/workflows/cpu-tests.yml b/.github/workflows/cpu-tests.yml index f28293e1..d144bdcd 100644 --- a/.github/workflows/cpu-tests.yml +++ b/.github/workflows/cpu-tests.yml @@ -179,7 +179,7 @@ jobs: - name: Download test data repository from RODARE shell: 'bash -c "docker exec -i mala-cpu python < {0}"' run: | - import requests + import requests, shutil, zipfile # This DOI represents all versions, and will always resolve to the latest one DOI = "https://doi.org/10.14278/rodare.2900" @@ -204,12 +204,12 @@ jobs: with open("test-data.zip", mode="wb") as file: file.write(response.content) - # Once downloaded, we have to unzip the file. The name of the root - # folder in the zip file has to be updated for data repository - # updates as well - the string at the end is the hash of the data - # repository commit. - #unzip -q test-data-1.8.1.zip - #mv mala-project-test-data-741eda6 mala_data + # Get top level dir name + dir_name = zipfile.ZipFile("test-data.zip").namelist()[0] + shutil.unpack_archive("test-data.zip", ".") + + print(f"Rename {dir_name} to mala_data") + shutil.move(dir_name, "mala_data") - name: Test mala shell: 'bash -c "docker exec -i mala-cpu bash < {0}"'