Skip to content

Commit

Permalink
Different strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida committed Oct 26, 2023
1 parent efad596 commit 7f5c9c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/python-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install 'setuptools>=61'
pip install -r requirements/test.txt
- name: Install multicorn2
run: |
Expand All @@ -40,13 +41,16 @@ jobs:
- name: Start the Postgres service
run: |
docker-compose -f postgres/docker-compose.yml up --build -d
- name: Check if Postgres is ready
- name: List running containers
run: |
docker run --network container:postgres_postgres_1 postgres_postgres pg_isready \
-h postgres \
-p 5432 \
-U shillelagh \
--timeout=30
docker ps
- name: Check Postgres logs
run: |
sleep 5
docker logs postgres_postgres_1
- name: Wait for Postgres to become available
run: |
until docker run --network container:postgres_postgres_1 postgres_postgres pg_isready -h postgres -p 5432 -U shillelagh --timeout=90; do sleep 10; done
- name: Test with pytest
env:
SHILLELAGH_ADAPTER_KWARGS: ${{ secrets.SHILLELAGH_ADAPTER_KWARGS }}
Expand All @@ -55,4 +59,5 @@ jobs:
- name: Stop the Postgres service
if: always()
run: |
docker logs postgres_postgres_1
docker-compose -f postgres/docker-compose.yml down
2 changes: 1 addition & 1 deletion postgres/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- ./entrypoint.sh:/usr/local/bin/custom_entrypoint.sh
- ..:/src
ports:
- "12345:5432"
- "5432:5432"
entrypoint: /usr/local/bin/custom_entrypoint.sh

volumes:
Expand Down

0 comments on commit 7f5c9c9

Please sign in to comment.