Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check alembic branch divergence in CI #1773

Merged
merged 3 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/lint-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ jobs:
# Only run the markdown link check on ubuntu-latest and python 3.8
if: ${{ inputs.os == 'ubuntu-latest' && inputs.python-version == '3.8' }}

- name: Check for alembic branch divergence
run: |
bash scripts/check-alembic-branches.sh

- name: Run unit tests
run: |
bash scripts/test-coverage-xml.sh unit
Expand Down
13 changes: 13 additions & 0 deletions scripts/check-alembic-branches.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Run the alembic branches command and capture the output
output=$(alembic branches)

# Check if there's any output
if [[ -n "$output" ]]; then
echo "Warning: Diverging Alembic branches detected."
exit 1 # Exit with failure status
else
echo "No diverging Alembic branches detected."
exit 0 # Exit with success status
fi
Loading