Skip to content

Commit

Permalink
test: third case
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKalho committed Oct 21, 2024
1 parent e4e0cef commit b3f2485
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/migrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,24 @@ jobs:
echo "Changes look valid."
prevent-changes:
run: |
EXISTING_MIGRATIONS=$(git ls-tree -r HEAD --name-only | grep "core/alembic/versions/.*\.py")
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

for migration in $EXISTING_MIGRATION; do
if git diff --name-only HEAD | grep "$migration"; then
echo "An already existing migration should not be edited!"
exit 1
fi
done
- name: prevent-changes-to-existing-migrations
run: |
EXISTING_MIGRATIONS=$(git ls-tree -r HEAD --name-only | grep "core/alembic/versions/.*\.py")
echo $EXISTING_MIGRATIONS
for migration in $EXISTING_MIGRATIONS; do
if git diff --name-only HEAD | grep "$migration"; then
echo "An already existing migration should not be edited!"
exit 1
fi
done
1 change: 1 addition & 0 deletions core/services/user_service/models/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("test")

0 comments on commit b3f2485

Please sign in to comment.