File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 SECRET_BASE_KEY : test_key
1919 RAILS_ENV : test
2020 REDIS_TEST_URL : redis://localhost:6379/0
21+ PREV_SHA : ${{ github.event.pull_request.base.sha || github.event.before }}
22+
2123 services :
2224 postgres :
2325 image : postgres
@@ -59,17 +61,17 @@ jobs:
5961 cp config/ingestion.example.yml config/ingestion.yml
6062 - name : Checkout previous schema
6163 # Checks out previous schema.rb and temporarily renames migrations
62- if : github.event.before != '0000000000000000000000000000000000000000'
64+ if : env.PREV_SHA != '0000000000000000000000000000000000000000'
6365 run : |
64- git fetch origin ${{ github.event.before }}
65- git checkout ${{ github.event.before }} -- db/schema.rb
66+ git fetch origin ${{ env.PREV_SHA }}
67+ git checkout ${{ env.PREV_SHA }} -- db/schema.rb
6668 mv db/migrate db/migrate.bkp
67- git checkout ${{ github.event.before }} -- db/migrate
69+ git checkout ${{ env.PREV_SHA }} -- db/migrate
6870 - name : Load previous database schema
6971 run : bundle exec rake db:test:prepare
7072 - name : Restore migrations
7173 # Restore the renamed migrations
72- if : github.event.before != '0000000000000000000000000000000000000000'
74+ if : env.PREV_SHA != '0000000000000000000000000000000000000000'
7375 run : |
7476 rm -rf db/migrate
7577 mv db/migrate.bkp db/migrate
You can’t perform that action at this time.
0 commit comments