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 644f35c57f - Show all commits

View File

@ -34,6 +34,20 @@ jobs:
sleep 1
echo "Trying again"
done
- name: Get all migrations added
id: changed-migration-files
uses: tj-actions/changed-files@v45
with:
files: |
db/migrate/**.rb
- name: List all migrations added
if: steps.changed-migration-files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-migration-files.outputs.all_changed_files }}
run: |
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)