Skip to content

Commit

Permalink
ci: Install btree_gin postgres extension in ci db
Browse files Browse the repository at this point in the history
  • Loading branch information
R2ZER0 committed Mar 19, 2024
1 parent 6b34769 commit 0153b2b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,18 @@ jobs:
# FIXME manual install datagetter requirements
- run: pip install -r src/datagetter/requirements.txt

- run: echo "localhost:5432:postgres:postgres:postgres" > ~/.pgpass && chmod 600 ~/.pgpass
- run: >-
echo "localhost:5432:postgres:postgres:postgres" > ~/.pgpass
&& echo "localhost:5432:360givingdatastore:postgres:postgres" >> ~/.pgpass
&& chmod 600 ~/.pgpass
- run: psql -c 'CREATE DATABASE "360givingdatastore";' -W -h localhost postgres postgres
- run: psql -c "CREATE USER test WITH ENCRYPTED PASSWORD 'test'; GRANT ALL PRIVILEGES ON DATABASE \"360givingdatastore\" TO test; ALTER USER test CREATEDB;" -W -h localhost postgres postgres

# Install btree_gin extension
- run: psql -c "SELECT * FROM pg_extension WHERE extname = 'btree_gin';" -W -h localhost 360givingdatastore postgres
- run: psql -c "CREATE EXTENSION btree_gin;" -W -h localhost 360givingdatastore postgres
- run: psql -c "SELECT * FROM pg_extension WHERE extname = 'btree_gin';" -W -h localhost 360givingdatastore postgres

- run: ./datastore/manage.py makemigrations --dry-run --check
- run: ./datastore/manage.py migrate
- run: coverage run --source='./datastore' ./datastore/manage.py test -v 3 tests
Expand Down

0 comments on commit 0153b2b

Please sign in to comment.