Skip to content

Commit

Permalink
setup containers & env to test
Browse files Browse the repository at this point in the history
  • Loading branch information
extreme4all committed Nov 22, 2024
1 parent 5c14ef3 commit a757709
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/hetzner-prd-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ jobs:
# - run: uv run pyright
tests:
runs-on: [self-hosted, "hetzner"]
needs: [lock_file, linting, formatting]
needs: [lock_file]
env:
ENV: "DVP"
DATABASE_URL: "mysql+aiomysql://root:root_bot_buster@mysql:3306/playerdata"
KAFKA_HOST: "localhost:9092"
POOL_RECYCLE: 60
POOL_TIMEOUT: 30
steps:
- uses: actions/checkout@v4
- name: Install uv
Expand All @@ -61,9 +67,18 @@ jobs:
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"

- name: Setup Docker Containers
run: |
docker-compose --verbose up --build -d
- name: Check API is Up
uses: cygnetdigital/[email protected]
with:
url: "http://localhost:5000/docs"
responseCode: "200,500"
timeout: 120000 # wait up to 120 seconds
interval: 5000 # poll every 5 seconds
- run: uv run pytest -v --durations=0 --cov --cov-report=xml

# This workflow contains two jobs: build_image and update_image_version
build_image:
runs-on: [self-hosted, "hetzner"]
Expand Down Expand Up @@ -102,7 +117,7 @@ jobs:
needs: build_image
# Run only on manual trigger
if: ${{ github.event_name == 'workflow_dispatch' }}

steps:
- name: Checkout Target Repository
uses: actions/checkout@v3
Expand Down

0 comments on commit a757709

Please sign in to comment.