diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index 0c18d062..8164f0ca 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -33,12 +33,26 @@ jobs: services: postgresql: image: postgres + env: + POSTGRES_PASSWORD: postgres + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 ports: - 5432:5432 + redis: image: redis + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 ports: - 6379:6379 + ckan-solr: # Workflow level env variables are not addressable on job level, only on steps level # image: ghcr.io/keitaroinc/ckan-solr-dev:{{ env.CKANVERSION }} diff --git a/bin/setup-ckan.bash b/bin/setup-ckan.bash index 7dc7ee03..6148ec93 100755 --- a/bin/setup-ckan.bash +++ b/bin/setup-ckan.bash @@ -37,8 +37,8 @@ pip install -r dev-requirements.txt cd - echo "Creating the PostgreSQL user and database..." -sudo -u postgres psql -c "CREATE USER ckan_default WITH PASSWORD 'pass';" -sudo -u postgres psql -c 'CREATE DATABASE ckan_test WITH OWNER ckan_default;' +PGPASSWORD=postgres sudo -u postgres psql -h localhost -c "CREATE USER ckan_default WITH PASSWORD 'pass';" +PGPASSWORD=postgres sudo -u postgres psql -h localhost -c 'CREATE DATABASE ckan_test WITH OWNER ckan_default;' echo "Initialising the database..." cd ckan