Skip to content

Commit

Permalink
CI: Fix installation of defined SQLAlchemy version, bringing back SA13
Browse files Browse the repository at this point in the history
The order of operations was wrong. So, previously, the process would
always install SQLAlchemy 1.4, skipping testing on SQLAlchemy 1.3.
  • Loading branch information
amotl committed Dec 22, 2022
1 parent 7eb3ede commit 412d9b7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ jobs:
# Bootstrap environment.
source bootstrap.sh
# Report about the test matrix slot.
echo "Invoking tests with CrateDB ${CRATEDB_VERSION} and SQLAlchemy ${SQLALCHEMY_VERSION}"
# Invoke validation tasks.
flake8 src bin
coverage run bin/test -vv1
Expand Down
9 changes: 9 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ function setup_package() {
# Install package in editable mode.
pip install --editable='.[sqlalchemy,test,doc]'

# Install designated SQLAlchemy version.
if [ -n "${SQLALCHEMY_VERSION}" ]; then
if [ "${SQLALCHEMY_VERSION}" = "latest" ]; then
pip install "sqlalchemy" --upgrade
else
pip install "sqlalchemy==${SQLALCHEMY_VERSION}"
fi
fi

}

function run_buildout() {
Expand Down
14 changes: 0 additions & 14 deletions devtools/setup_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,6 @@ function main() {
echo "Environment variable 'CRATEDB_VERSION' needed"
exit 1
}
[ -z ${SQLALCHEMY_VERSION} ] && {
echo "Environment variable 'SQLALCHEMY_VERSION' needed"
exit 1
}

# Let's go.
echo "Invoking tests with CrateDB ${CRATEDB_VERSION} and SQLAlchemy ${SQLALCHEMY_VERSION}"

# Install designated SQLAlchemy version.
if [ ${SQLALCHEMY_VERSION} = "latest" ]; then
pip install "sqlalchemy" --upgrade
else
pip install "sqlalchemy==${SQLALCHEMY_VERSION}"
fi

# Replace CrateDB version.
if [ ${CRATEDB_VERSION} = "nightly" ]; then
Expand Down

0 comments on commit 412d9b7

Please sign in to comment.