Skip to content

Commit

Permalink
ci: Rename alembic-check-multiple-heads to check-alembic-migrations (#…
Browse files Browse the repository at this point in the history
…2484)

Backported-from: main (24.09)
Backported-to: 23.09
Backport-of: 2484
  • Loading branch information
achimnol committed Jul 17, 2024
1 parent dbda027 commit a80b5f9
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 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,6 +363,8 @@ jobs:
if: always() # We want the log even on failures.

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

make-final-release:
Expand Down

0 comments on commit a80b5f9

Please sign in to comment.