Test reversibility of migrations #220
@ -34,6 +34,20 @@ jobs:
|
|||||||
sleep 1
|
sleep 1
|
||||||
echo "Trying again"
|
echo "Trying again"
|
||||||
done
|
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: |
|
- run: |
|
||||||
git fetch origin ${{ github.event.pull_request.base.sha }}
|
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)
|
migrations_added=$(git diff ${{ github.event.pull_request.base.sha }} --name-only db/migrate/ | wc -l)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user