Test reversibility of migrations #220
| @ -21,6 +21,7 @@ jobs: | |||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v4 |       - uses: actions/checkout@v4 | ||||||
|         with: |         with: | ||||||
|  |           depth: 2 | ||||||
|           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 | ||||||
| @ -34,6 +35,8 @@ jobs: | |||||||
|             echo "Trying again" |             echo "Trying again" | ||||||
|           done |           done | ||||||
|       - run: | |       - run: | | ||||||
|  |           migrations_added=$(git diff origin/main --name-only db/migrate/ | wc -l) | ||||||
|  |           echo "Migrations added: $migrations_added" | ||||||
|           bundle exec rake db:schema:load db:migrate:status db:migrate:redo |           bundle exec rake db:schema:load db:migrate:status db:migrate:redo | ||||||
|           git diff --exit-code db/schema.rb |           git diff --exit-code db/schema.rb | ||||||
|           bundle exec rspec |           bundle exec rspec | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user