diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 30b9997..8341f66 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,6 +26,13 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - uses: ruby/setup-ruby@v1 - 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: | bundle exec rake db:create db:schema:load bundle exec rspec