Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ jobs:
- name: Dump DB
run: stat db.sqlite3
- name: Test data
run: curl -Ss http://localhost:8000/api/v2/pokemon/1/ | grep -q 'bulbasaur'
run: |
curl -Ss http://localhost:8000/api/v2/pokemon/11/ | grep -q 'metapod'
curl -Ss http://localhost:8000/api/v2/pokemon/11/encounters | grep -q 'eterna-forest-area'
postgres:
runs-on: ubuntu-latest
steps:
Expand All @@ -69,4 +71,7 @@ jobs:
docker compose cp ./pokeapi.dump db:/tmp/
docker compose exec -T -u postgres db sh -c "cd /tmp && pg_restore -h localhost -U ash -d pokeapi pokeapi.dump"
- name: Test data
run: curl -Ss http://localhost/api/v2/pokemon/1/ | grep -q 'bulbasaur'
run: |
sleep 10
curl -Ss http://localhost:8000/api/v2/pokemon/1/ | grep -q 'bulbasaur'
curl -Ss http://localhost:8000/api/v2/pokemon/1/encounters | grep -q '['
Loading