-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYNPY-1520] Support python 3.12 (#1133)
* Support py 3.12
- Loading branch information
1 parent
35db9a9
commit 97085de
Showing
10 changed files
with
227 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
python-version: '3.12' | ||
- uses: pre-commit/[email protected] | ||
|
||
|
||
|
@@ -48,7 +48,8 @@ jobs: | |
os: [ubuntu-20.04, macos-12, windows-2022] | ||
|
||
# if changing the below change the run-integration-tests versions and the check-deploy versions | ||
python: [3.8, '3.9', '3.10', '3.11'] | ||
# Make sure that we are running the integration tests on the first and last versions of the matrix | ||
python: [3.8, '3.9', '3.10', '3.11', '3.12'] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
|
@@ -62,8 +63,8 @@ jobs: | |
- name: get-dependencies-location | ||
shell: bash | ||
run: | | ||
SITE_PACKAGES_LOCATION=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") | ||
SITE_BIN_DIR=$(python3 -c "import os; import platform; import distutils.sysconfig; pre = distutils.sysconfig.get_config_var('prefix'); bindir = os.path.join(pre, 'Scripts' if platform.system() == 'Windows' else 'bin'); print(bindir)") | ||
SITE_PACKAGES_LOCATION=$(python -c "from sysconfig import get_path; print(get_path('purelib'))") | ||
SITE_BIN_DIR=$(python3 -c "import os; import platform; import sysconfig; pre = sysconfig.get_config_var('prefix'); bindir = os.path.join(pre, 'Scripts' if platform.system() == 'Windows' else 'bin'); print(bindir)") | ||
echo "site_packages_loc=$SITE_PACKAGES_LOCATION" >> $GITHUB_OUTPUT | ||
echo "site_bin_dir=$SITE_BIN_DIR" >> $GITHUB_OUTPUT | ||
id: get-dependencies | ||
|
@@ -100,7 +101,7 @@ jobs: | |
pytest -sv --cov-append --cov=. --cov-report xml tests/unit | ||
- name: Check for Secret availability | ||
id: secret-check | ||
if: ${{ contains(fromJSON('["3.9"]'), matrix.python) }} | ||
if: ${{ contains(fromJSON('["3.8"]'), matrix.python) || contains(fromJSON('["3.12"]'), matrix.python) }} | ||
# perform secret check & put boolean result as an output | ||
shell: bash | ||
run: | | ||
|
@@ -159,7 +160,7 @@ jobs: | |
shell: bash | ||
|
||
# keep versions consistent with the first and last from the strategy matrix | ||
if: ${{ contains(fromJSON('["3.9"]'), matrix.python) && steps.secret-check.outputs.secrets_available == 'true'}} | ||
if: ${{ (contains(fromJSON('["3.8"]'), matrix.python) || contains(fromJSON('["3.12"]'), matrix.python)) && steps.secret-check.outputs.secrets_available == 'true'}} | ||
run: | | ||
# decrypt the encrypted test synapse configuration | ||
openssl aes-256-cbc -K ${{ secrets.encrypted_d17283647768_key }} -iv ${{ secrets.encrypted_d17283647768_iv }} -in test.synapseConfig.enc -out test.synapseConfig -d | ||
|
@@ -192,7 +193,7 @@ jobs: | |
fi | ||
# use loadscope to avoid issues running tests concurrently that share scoped fixtures | ||
pytest -sv --reruns 3 --cov-append --cov=. --cov-report xml tests/integration -n auto --ignore=tests/integration/synapseclient/test_command_line_client.py --dist loadscope | ||
pytest -sv --reruns 3 --cov-append --cov=. --cov-report xml tests/integration -n 8 --ignore=tests/integration/synapseclient/test_command_line_client.py --dist loadscope | ||
# Execute the CLI tests in a non-dist way because they were causing some test instability when being run concurrently | ||
pytest -sv --reruns 3 --cov-append --cov=. --cov-report xml tests/integration/synapseclient/test_command_line_client.py | ||
|
@@ -206,7 +207,7 @@ jobs: | |
- name: Upload coverage report | ||
id: upload_coverage_report | ||
uses: actions/upload-artifact@v4 | ||
if: ${{ contains(fromJSON('["3.9"]'), matrix.python) && contains(fromJSON('["ubuntu-20.04"]'), matrix.os)}} | ||
if: ${{ contains(fromJSON('["3.12"]'), matrix.python) && contains(fromJSON('["ubuntu-20.04"]'), matrix.os)}} | ||
with: | ||
name: coverage-report | ||
path: coverage.xml | ||
|
@@ -401,7 +402,7 @@ jobs: | |
os: [ubuntu-20.04, macos-12, windows-2022] | ||
|
||
# python versions should be consistent with the strategy matrix and the runs-integration-tests versions | ||
python: [3.8, '3.9', '3.10', '3.11'] | ||
python: [3.8, '3.9', '3.10', '3.11', '3.12'] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.