Explicitly wait for Postgres to be ready to accept connections
Some checks failed
Run unit tests / unit_tests (pull_request) Has been cancelled

This commit is contained in:
Manuel Bustillo 2024-07-30 21:30:16 +02:00
parent 4ff719fa1f
commit eade9f0318

View File

@ -26,6 +26,13 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@v1
- run: bundle install - run: bundle install
- name: Wait until Postgres is ready to accept connections
run: |
until pg_isready -h postgres -U postgres -d postgres
do
sleep 1
echo "Trying again"
done
- run: | - run: |
bundle exec rake db:create db:schema:load bundle exec rake db:create db:schema:load
bundle exec rspec bundle exec rspec