File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,21 @@ jobs:
2929 with :
3030 python-version : ${{ matrix.python-version }}
3131
32- - name : Start Postgres container
33- run : |
34- docker run -d --name test-postgres -e POSTGRES_USER=scancodeio -e POSTGRES_PASSWORD=scancodeio -e POSTGRES_DB=scancodeio -p 5432:5432 postgres:13
35-
36- - name : Wait for Postgres to be ready
37- run : |
38- until pg_isready -h localhost -p 5432; do sleep 1; done
32+ - name : Set up Python ${{ matrix.python-version }}
33+ uses : ikalnytskyi/action-setup-postgres@v7
34+ id : postgres
35+ with :
36+ postgres-version : " 13"
37+ database : ${{ env.POSTGRES_DB }}
38+ username : ${{ env.POSTGRES_USER }}
39+ password : ${{ env.POSTGRES_PASSWORD }}
40+ port : 5432
41+
42+ - run : psql ${{ steps.postgres.outputs.connection-uri }} -c "SELECT 1"
43+ - run : psql service=${{ steps.postgres.outputs.service-name }} -c "SELECT 1"
44+ - run : psql -c "SELECT 1"
45+ env :
46+ PGSERVICE : ${{ steps.postgres.outputs.service-name }}
3947
4048 - name : Install Python dependencies
4149 run : make dev envfile
You can’t perform that action at this time.
0 commit comments