diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..4cc5fd43 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,18 @@ +name: CI_test +on: + push: + branches: + - main + - development + - feature-tests + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Download PhysiCell + run: | + python ./tests/get_my_physicell.py + unzip PhysiCell-my-physicell.zip PhysiCell \ No newline at end of file diff --git a/tests/get_my_physicell.py b/tests/get_my_physicell.py new file mode 100644 index 00000000..992e4abc --- /dev/null +++ b/tests/get_my_physicell.py @@ -0,0 +1,16 @@ +# Python script to download the latest release of PhysiCell + +import requests + +branch = "my-physicell" + +response = requests.get(f"https://api.github.com/repos/drbergman/PhysiCell/branches/{branch}") +print(response) +release_name_str = response.json()["name"] + +remote_url = f"https://github.com/drbergman/PhysiCell/archive/refs/heads/{branch}.zip" +print("remote_url=",remote_url) +local_file = f"PhysiCell-{branch}.zip" +data = requests.get(remote_url) +with open(local_file, 'wb')as file: + file.write(data.content)