From 1fd05219910fec59c577eb2362476b14bba69612 Mon Sep 17 00:00:00 2001 From: ThanKarab Date: Sun, 22 Sep 2024 15:59:31 +0300 Subject: [PATCH] chore: Minor fixes to update dev deployment setup --- .../portalbackend-integration-tests.yml | 20 ++++++++++++------- dev/start.sh | 9 +++------ dev/test.sh | 5 ----- 3 files changed, 16 insertions(+), 18 deletions(-) delete mode 100755 dev/test.sh diff --git a/.github/workflows/portalbackend-integration-tests.yml b/.github/workflows/portalbackend-integration-tests.yml index b82a05a0..01e7862d 100644 --- a/.github/workflows/portalbackend-integration-tests.yml +++ b/.github/workflows/portalbackend-integration-tests.yml @@ -11,18 +11,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repository - uses: actions/checkout@v1 + uses: actions/checkout@v4 - name: Set up python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 - - name: Install Docker Compose - run: | - sudo curl -L "https://github.com/docker/compose/releases/download/$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep tag_name | cut -d '"' -f 4)/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose - sudo chmod +x /usr/local/bin/docker-compose - docker-compose --version + - name: Install docker compose + uses: KengoTODA/actions-setup-docker-compose@v1 + with: + version: '2.30.1' + + - name: Docker compose version + run: docker compose version - name: Deploy portalbackend and exareme2 working-directory: ./dev/ @@ -31,6 +33,10 @@ jobs: - name: Get deployment status run: docker ps + - name: Install python dependencies + working-directory: ./dev/ + run: pip install -r requirements.txt + - name: Run the dev tests working-directory: ./dev/ run: pytest -k "not test_federation_info.py" diff --git a/dev/start.sh b/dev/start.sh index 2e6bb42a..4f5cead6 100755 --- a/dev/start.sh +++ b/dev/start.sh @@ -1,10 +1,7 @@ #!/bin/env bash -docker-compose --env-file ../.versions_env down -docker-compose --env-file ../.versions_env up -d - -echo -n "Installing pip requirements ..." -pip install -r requirements.txt +docker compose --env-file ../.versions_env down +docker compose --env-file ../.versions_env up -d echo -n "Waiting for containers to start ..." sleep 10 @@ -13,7 +10,7 @@ echo -n "Loading data into exareme2 db ..." docker exec dev-exareme2_global_mipdb-1 mipdb init docker exec dev-exareme2_local_mipdb-1 /bin/bash -c "mipdb init && mipdb load-folder /opt/data" -sleep 10 +sleep 20 echo -n "Triggering engine to see the added pathologies ..." curl -X POST 172.17.0.1:5000/wla diff --git a/dev/test.sh b/dev/test.sh deleted file mode 100755 index 5dccf476..00000000 --- a/dev/test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/env bash - -pytest -k "not test_federation_info.py" tests -pytest tests/test_federation_info.py -