Skip to content

Commit

Permalink
Different strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida committed Oct 27, 2023
1 parent 80044ec commit dcd415a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/python-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,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 +58,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/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y \
postgresql-server-dev-13 \
python3 \
python3-dev \
python3-setuptools \
#python3-setuptools \
python3-pip \
python3-venv \
wget
Expand 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
3 changes: 2 additions & 1 deletion postgres/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ set -e # If any command fails, stop the script
cd
python3 -m venv venv
source venv/bin/activate
pip3 install 'setuptools>=61' wheel

# install shillelagh
cd /src
pip3 install -e '.[all]'
pip3 install -v -e '.[all]'

# install multicorn2
rm -rf multicorn2
Expand Down

0 comments on commit dcd415a

Please sign in to comment.