diff --git a/.github/workflows/app_deploy_test.yml b/.github/workflows/app_deploy_test.yml index 92dd144..274998e 100644 --- a/.github/workflows/app_deploy_test.yml +++ b/.github/workflows/app_deploy_test.yml @@ -33,23 +33,11 @@ jobs: tags: siliataider/citymanager-app:latest context: . file: ./Dockerfile - - deploy: + + test-back-python: runs-on: ubuntu-latest needs: build-and-dockerize - steps: - - uses: actions/checkout@v2 - - - name: Deploy to Render - run: > - curl -X POST -H 'Authorization: Bearer ${{ secrets.RENDER_API_KEY }}' -d '' - https://api.render.com/deploy/srv-cmkfojta73kc73bmc4a0?key=8aIKnO5Qv_w - - test-server: - runs-on: ubuntu-latest - needs: deploy - steps: - name: Checkout code uses: actions/checkout@v2 @@ -69,3 +57,54 @@ jobs: run: | cd backAgent python -m pytest + + test-back-java: + runs-on: ubuntu-latest + needs: build-and-dockerize + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'adopt' + + - name: Test with Maven + run: cd BackSimulation && mvn test + + deploy: + runs-on: ubuntu-latest + needs: test-back-python, test-back-java + + steps: + - uses: actions/checkout@v2 + + - name: Deploy to Render + run: > + curl -X POST -H 'Authorization: Bearer ${{ secrets.RENDER_API_KEY }}' -d '' + https://api.render.com/deploy/srv-cmkfojta73kc73bmc4a0?key=8aIKnO5Qv_w + + test-deployment: + runs-on: ubuntu-latest + needs: build-and-deploy + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.10.12' + + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install requests + + - name: Check Deployment Status on Render + run: python backAgent/tests/check_deployment_status.py + env: + RENDER_API_KEY: ${{ secrets.RENDER_API_KEY }} + SERVICE_ID: 'srv-cmikfaq1hbls738fek40' \ No newline at end of file diff --git a/backAgent/deploy.txt b/backAgent/deploy.txt index ef52901..24a52bf 100644 --- a/backAgent/deploy.txt +++ b/backAgent/deploy.txt @@ -1,4 +1,5 @@ 1 1 1 +1 1 \ No newline at end of file