Skip to content

Commit

Permalink
Merge pull request #155 from siliataider/silia-dev
Browse files Browse the repository at this point in the history
update ci workflow
  • Loading branch information
siliataider authored Jan 23, 2024
2 parents 623d6a6 + fd6a661 commit a500241
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 14 deletions.
67 changes: 53 additions & 14 deletions .github/workflows/app_deploy_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
1 change: 1 addition & 0 deletions backAgent/deploy.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
1
1
1
1
1

0 comments on commit a500241

Please sign in to comment.