Skip to content

Commit b13a09c

Browse files
committed
CI: integrate alembic check
1 parent 278224f commit b13a09c

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/workflows/run-unit-tests.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ on: # yamllint disable-line rule:truthy
7070
required: false
7171
default: "false"
7272
type: string
73+
run-alembic-check:
74+
description: "Whether to run alembic check or not (true/false)"
75+
required: false
76+
default: "false"
77+
type: string
7378
run-coverage:
7479
description: "Whether to run coverage or not (true/false)"
7580
required: true
@@ -175,6 +180,10 @@ jobs:
175180
Migration Tests: ${{ matrix.python-version }}:${{ env.PARALLEL_TEST_TYPES }}
176181
uses: ./.github/actions/migration_tests
177182
if: inputs.run-migration-tests == 'true' && inputs.test-group == 'core'
183+
- name: >
184+
Alembic Check: ${{ matrix.python-version }}:${{ env.PARALLEL_TEST_TYPES }}
185+
run: ./scripts/in_container/run_alembic_check.sh
186+
if: inputs.run-alembic-check == 'true' && inputs.test-group == 'core'
178187
- name: >
179188
${{ inputs.test-group }}:${{ inputs.test-scope }} Tests ${{ inputs.test-name }} ${{ matrix.backend-version }}
180189
Py${{ matrix.python-version }}:${{ env.PARALLEL_TEST_TYPES }}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
. "$(dirname "${BASH_SOURCE[0]}")/_in_container_script_init.sh"
19+
20+
echo
21+
echo "Running Alembic check to verify database schema compatibility"
22+
echo
23+
24+
alembic check
25+
26+
exit $?

0 commit comments

Comments
 (0)