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

ci: Rename alembic-check-multiple-heads to check-alembic-migrations (#2484) #2487

Closed
wants to merge 1 commit into from
Closed
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
33 changes: 30 additions & 3 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,33 @@ jobs:
if: always() # We want the log even on failures.


check-alembic-migrations:
if: |
${{ contains(github.event.pull_request.labels.*.name, 'require:db-migration')
&& !contains(fromJSON('["flow:merge-queue", "flow:hotfix"]'), github.event.label.name)
&& github.event.pull_request.merged == false
&& needs.optimize-ci.outputs.skip == 'false'
}}
needs: [optimize-ci]
runs-on: ubuntu-latest
steps:
- name: Check out the revision
uses: actions/checkout@v4
with:
lfs: false
- name: Parse versions from config
run: |
PYTHON_VERSION=$(grep -m 1 -oP '(?<=CPython==)([^"]+)' pants.toml)
echo "PANTS_CONFIG_FILES=pants.ci.toml" >> $GITHUB_ENV
echo "PROJECT_PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV
- name: Set up Python as Runtime
uses: actions/setup-python@v5
with:
python-version: ${{ env.PROJECT_PYTHON_VERSION }}
- name: Check for multiple heads
run: python scripts/check-multiple-alembic-heads.py


typecheck:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') && github.event.pull_request.merged == false }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -211,7 +238,7 @@ jobs:


build-scies:
needs: [lint, typecheck, test]
needs: [lint, typecheck, test, check-alembic-migrations]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
strategy:
fail-fast: false
Expand Down Expand Up @@ -270,7 +297,7 @@ jobs:


build-wheels:
needs: [lint, typecheck, test]
needs: [lint, typecheck, test, check-alembic-migrations]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -336,7 +363,7 @@ jobs:
if: always() # We want the log even on failures.

build-sbom:
needs: [lint, typecheck, test]
needs: [lint, typecheck, test, check-alembic-migrations]
if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
uses: ./.github/workflows/sbom.yml

Expand Down
Loading