diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index 8164f0ca..ddebf223 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -74,6 +74,8 @@ jobs: pip install pytest coveralls - name: Setup CKAN + env: + PGPASSWORD: postgres run: | bash bin/setup-ckan.bash diff --git a/bin/setup-ckan.bash b/bin/setup-ckan.bash index 6148ec93..4c45aec5 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..." -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;' +psql -h localhost -U postgres -c "CREATE USER ckan_default WITH PASSWORD 'pass';" +psql -h localhost -U postgres -c 'CREATE DATABASE ckan_test WITH OWNER ckan_default;' echo "Initialising the database..." cd ckan