Test reversibility of migrations #220

Merged
bustikiller merged 35 commits from test-rollbacks into main 2025-01-25 09:43:43 +00:00
Showing only changes of commit 139502c69a - Show all commits

View File

@ -45,13 +45,12 @@ jobs:
env:
ALL_CHANGED_FILES: ${{ steps.changed-migration-files.outputs.all_changed_files }}
run: |
echo ${#ALL_CHANGED_FILES[@]}
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
- run: |
git fetch origin ${{ github.event.pull_request.base.sha }}
migrations_added=$(git diff ${{ github.event.pull_request.base.sha }} --name-only db/migrate/ | wc -l)
echo "Migrations added: $migrations_added"
exit 1
bundle exec rake db:schema:load db:migrate:status db:migrate:redo
git diff --exit-code db/schema.rb
bundle exec rspec