Skip to content

Commit

Permalink
SNOW-741094: add py311 to matrix (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-aling authored Feb 9, 2023
1 parent 172e5d2 commit 13f543d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create_req_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/sqlalchemy_build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ RUN chmod +x /usr/local/bin/entrypoint.sh
WORKDIR /home/user
RUN chmod 777 /home/user

ENV PATH="${PATH}:/opt/python/cp37-cp37m/bin:/opt/python/cp38-cp38/bin:/opt/python/cp39-cp39/bin:/opt/python/cp310-cp310/bin"
ENV PATH="${PATH}:/opt/python/cp37-cp37m/bin:/opt/python/cp38-cp38/bin:/opt/python/cp39-cp39/bin:/opt/python/cp310-cp310/bin:/opt/python/cp311-cp311/bin"

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
9 changes: 4 additions & 5 deletions ci/test_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
#
# Test Snowflake SQLAlchemy in Linux
# NOTES:
# - Versions to be tested should be passed in as the first argument, e.g: "3.7 3.8". If omitted 3.7-3.10 will be assumed.
# - Versions to be tested should be passed in as the first argument, e.g: "3.7 3.8". If omitted 3.7-3.11 will be assumed.
# - This script assumes that ../dist/repaired_wheels has the wheel(s) built for all versions to be tested
# - This is the script that test_docker.sh runs inside of the docker container

PYTHON_VERSIONS="${1:-3.7 3.8 3.9 3.10}"
PYTHON_VERSIONS="${1:-3.7 3.8 3.9 3.10 3.11}"
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SQLALCHEMY_DIR="$( dirname "${THIS_DIR}")"

# Install one copy of tox
python3 -m pip install -U tox-external-wheels
python3 -m pip install --pre tox
python3 -m pip install -U tox

# Run tests
cd $SQLALCHEMY_DIR
Expand All @@ -22,5 +21,5 @@ for PYTHON_VERSION in ${PYTHON_VERSIONS}; do
SQLALCHEMY_WHL=$(ls $SQLALCHEMY_DIR/dist/snowflake_sqlalchemy-*-py2.py3-none-any.whl | sort -r | head -n 1)
TEST_ENVLIST=fix_lint,py${SHORT_VERSION}-ci,py${SHORT_VERSION}-coverage
echo "[Info] Running tox for ${TEST_ENVLIST}"
python3 -m tox -e ${TEST_ENVLIST} --external_wheels ${SQLALCHEMY_WHL}
python3 -m tox -e ${TEST_ENVLIST} --installpkg ${SQLALCHEMY_WHL}
done
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
min_version = 4.0.0
envlist = fix_lint,
py{37,38,39,310}{,-pandas},
py{37,38,39,310,311}{,-pandas},
coverage,
connector_regression
skip_missing_interpreters = true
Expand All @@ -17,6 +17,7 @@ external_wheels =
py38-ci: dist/*.whl
py39-ci: dist/.whl
py310-ci: dist/.whl
py311-ci: dist/.whl
deps = pip
passenv =
AWS_ACCESS_KEY_ID
Expand Down Expand Up @@ -78,7 +79,7 @@ commands = coverage combine
coverage xml -o {toxworkdir}/coverage.xml
coverage html -d {toxworkdir}/htmlcov
;diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}/coverage.xml
depends = py37, py38, py39, py310
depends = py37, py38, py39, py310, py311

[testenv:fix_lint]
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
Expand Down

0 comments on commit 13f543d

Please sign in to comment.