Test reversibility of migrations #220
@ -24,7 +24,8 @@ jobs:
|
|||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- uses: ruby/setup-ruby@v1.207.0
|
- uses: ruby/setup-ruby@v1.207.0
|
||||||
- run: bundle install
|
- run: bundle install
|
||||||
- name: Wait until Postgres is ready to accept connections
|
- &postgres_wait
|
||||||
|
name: Wait until Postgres is ready to accept connections
|
||||||
run: |
|
run: |
|
||||||
apt-get update && apt-get install -f -y postgresql-client
|
apt-get update && apt-get install -f -y postgresql-client
|
||||||
until pg_isready -h postgres -U postgres -d postgres
|
until pg_isready -h postgres -U postgres -d postgres
|
||||||
@ -59,13 +60,6 @@ jobs:
|
|||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- uses: ruby/setup-ruby@v1.207.0
|
- uses: ruby/setup-ruby@v1.207.0
|
||||||
- run: bundle install
|
- run: bundle install
|
||||||
- name: Wait until Postgres is ready to accept connections
|
- *postgres_wait
|
||||||
run: |
|
|
||||||
apt-get update && apt-get install -f -y postgresql-client
|
|
||||||
until pg_isready -h postgres -U postgres -d postgres
|
|
||||||
do
|
|
||||||
sleep 1
|
|
||||||
echo "Trying again"
|
|
||||||
done
|
|
||||||
- run: bundle exec rake db:schema:load
|
- run: bundle exec rake db:schema:load
|
||||||
- run: bundle exec rake db:migrate:redo
|
- run: bundle exec rake db:migrate:redo
|
Loading…
x
Reference in New Issue
Block a user