Skip to content

Commit 31e1dfb

Browse files
refactor workflows
1 parent 8218a01 commit 31e1dfb

File tree

3 files changed

+153
-150
lines changed

3 files changed

+153
-150
lines changed

.github/workflows/build_test.yml

Lines changed: 108 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -446,114 +446,115 @@ jobs:
446446
path: |
447447
junit.py${{ env.shortver }}-lambda-ci-dev.xml
448448
449-
# temporarily disable aio
450-
# test-aio:
451-
# name: Test asyncio ${{ matrix.os.download_name }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
452-
# needs: build
453-
# runs-on: ${{ matrix.os.image_name }}
454-
# strategy:
455-
# fail-fast: false
456-
# matrix:
457-
# os:
458-
# - image_name: ubuntu-latest
459-
# download_name: manylinux_x86_64
460-
# - image_name: macos-latest
461-
# download_name: macosx_x86_64
462-
# - image_name: windows-latest
463-
# download_name: win_amd64
464-
# python-version: ["3.10", "3.11", "3.12"]
465-
# cloud-provider: [aws, azure, gcp]
466-
# steps:
467-
# - uses: actions/checkout@v4
468-
# - name: Set up Python
469-
# uses: actions/setup-python@v4
470-
# with:
471-
# python-version: ${{ matrix.python-version }}
472-
# - name: Display Python version
473-
# run: python -c "import sys; print(sys.version)"
474-
# - name: Set up Java
475-
# uses: actions/setup-java@v4 # for wiremock
476-
# with:
477-
# java-version: 11
478-
# distribution: 'temurin'
479-
# java-package: 'jre'
480-
# - name: Fetch Wiremock
481-
# shell: bash
482-
# run: curl https://repo1.maven.org/maven2/org/wiremock/wiremock-standalone/3.11.0/wiremock-standalone-3.11.0.jar --output .wiremock/wiremock-standalone.jar
483-
# - name: Setup parameters file
484-
# shell: bash
485-
# env:
486-
# PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
487-
# run: |
488-
# gpg --quiet --batch --yes --decrypt --passphrase="$PARAMETERS_SECRET" \
489-
# .github/workflows/parameters/public/parameters_${{ matrix.cloud-provider }}.py.gpg > test/parameters.py
490-
# - name: Setup private key file
491-
# shell: bash
492-
# env:
493-
# PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
494-
# run: |
495-
# gpg --quiet --batch --yes --decrypt --passphrase="$PARAMETERS_SECRET" \
496-
# .github/workflows/parameters/public/rsa_keys/rsa_key_python_${{ matrix.cloud-provider }}.p8.gpg > test/rsa_key_python_${{ matrix.cloud-provider }}.p8
497-
# - name: Download wheel(s)
498-
# uses: actions/download-artifact@v4
499-
# with:
500-
# name: ${{ matrix.os.download_name }}_py${{ matrix.python-version }}
501-
# path: dist
502-
# - name: Show wheels downloaded
503-
# run: ls -lh dist
504-
# shell: bash
505-
# - name: Upgrade setuptools, pip and wheel
506-
# run: python -m pip install -U setuptools pip wheel
507-
# - name: Install tox
508-
# run: python -m pip install tox>=4
509-
# - name: Run tests
510-
# run: python -m tox run -e aio
511-
# env:
512-
# PYTHON_VERSION: ${{ matrix.python-version }}
513-
# cloud_provider: ${{ matrix.cloud-provider }}
514-
# PYTEST_ADDOPTS: --color=yes --tb=short
515-
# TOX_PARALLEL_NO_SPINNER: 1
516-
# - name: Combine coverages
517-
# run: python -m tox run -e coverage --skip-missing-interpreters false
518-
# shell: bash
519-
# - uses: actions/upload-artifact@v4
520-
# if: always()
521-
# with:
522-
# include-hidden-files: true
523-
# name: coverage_aio_${{ matrix.os.download_name }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
524-
# path: |
525-
# .tox/.coverage
526-
# .tox/coverage.xml
449+
test-aio:
450+
if: false # temporarily disable aio
451+
name: Test asyncio ${{ matrix.os.download_name }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
452+
needs: build
453+
runs-on: ${{ matrix.os.image_name }}
454+
strategy:
455+
fail-fast: false
456+
matrix:
457+
os:
458+
- image_name: ubuntu-latest
459+
download_name: manylinux_x86_64
460+
- image_name: macos-latest
461+
download_name: macosx_x86_64
462+
- image_name: windows-latest
463+
download_name: win_amd64
464+
python-version: ["3.10", "3.11", "3.12"]
465+
cloud-provider: [aws, azure, gcp]
466+
steps:
467+
- uses: actions/checkout@v4
468+
- name: Set up Python
469+
uses: actions/setup-python@v4
470+
with:
471+
python-version: ${{ matrix.python-version }}
472+
- name: Display Python version
473+
run: python -c "import sys; print(sys.version)"
474+
- name: Set up Java
475+
uses: actions/setup-java@v4 # for wiremock
476+
with:
477+
java-version: 11
478+
distribution: 'temurin'
479+
java-package: 'jre'
480+
- name: Fetch Wiremock
481+
shell: bash
482+
run: curl https://repo1.maven.org/maven2/org/wiremock/wiremock-standalone/3.11.0/wiremock-standalone-3.11.0.jar --output .wiremock/wiremock-standalone.jar
483+
- name: Setup parameters file
484+
shell: bash
485+
env:
486+
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
487+
run: |
488+
gpg --quiet --batch --yes --decrypt --passphrase="$PARAMETERS_SECRET" \
489+
.github/workflows/parameters/public/parameters_${{ matrix.cloud-provider }}.py.gpg > test/parameters.py
490+
- name: Setup private key file
491+
shell: bash
492+
env:
493+
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
494+
run: |
495+
gpg --quiet --batch --yes --decrypt --passphrase="$PARAMETERS_SECRET" \
496+
.github/workflows/parameters/public/rsa_keys/rsa_key_python_${{ matrix.cloud-provider }}.p8.gpg > test/rsa_key_python_${{ matrix.cloud-provider }}.p8
497+
- name: Download wheel(s)
498+
uses: actions/download-artifact@v4
499+
with:
500+
name: ${{ matrix.os.download_name }}_py${{ matrix.python-version }}
501+
path: dist
502+
- name: Show wheels downloaded
503+
run: ls -lh dist
504+
shell: bash
505+
- name: Upgrade setuptools, pip and wheel
506+
run: python -m pip install -U setuptools pip wheel
507+
- name: Install tox
508+
run: python -m pip install tox>=4
509+
- name: Run tests
510+
run: python -m tox run -e aio
511+
env:
512+
PYTHON_VERSION: ${{ matrix.python-version }}
513+
cloud_provider: ${{ matrix.cloud-provider }}
514+
PYTEST_ADDOPTS: --color=yes --tb=short
515+
TOX_PARALLEL_NO_SPINNER: 1
516+
- name: Combine coverages
517+
run: python -m tox run -e coverage --skip-missing-interpreters false
518+
shell: bash
519+
- uses: actions/upload-artifact@v4
520+
if: always()
521+
with:
522+
include-hidden-files: true
523+
name: coverage_aio_${{ matrix.os.download_name }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
524+
path: |
525+
.tox/.coverage
526+
.tox/coverage.xml
527527
528-
# test-unsupporeted-aio:
529-
# name: Test unsupported asyncio ${{ matrix.os.download_name }}-${{ matrix.python-version }}
530-
# runs-on: ${{ matrix.os.image_name }}
531-
# strategy:
532-
# fail-fast: false
533-
# matrix:
534-
# os:
535-
# - image_name: ubuntu-latest
536-
# download_name: manylinux_x86_64
537-
# python-version: [ "3.9", ]
538-
# steps:
539-
# - uses: actions/checkout@v4
540-
# - name: Set up Python
541-
# uses: actions/setup-python@v4
542-
# with:
543-
# python-version: ${{ matrix.python-version }}
544-
# - name: Display Python version
545-
# run: python -c "import sys; print(sys.version)"
546-
# - name: Upgrade setuptools, pip and wheel
547-
# run: python -m pip install -U setuptools pip wheel
548-
# - name: Install tox
549-
# run: python -m pip install tox>=4
550-
# - name: Run tests
551-
# run: python -m tox run -e aio-unsupported-python
552-
# env:
553-
# PYTHON_VERSION: ${{ matrix.python-version }}
554-
# PYTEST_ADDOPTS: --color=yes --tb=short
555-
# TOX_PARALLEL_NO_SPINNER: 1
556-
# shell: bash
528+
test-unsupported-aio:
529+
if: false # temporarily disable aio
530+
name: Test unsupported asyncio ${{ matrix.os.download_name }}-${{ matrix.python-version }}
531+
runs-on: ${{ matrix.os.image_name }}
532+
strategy:
533+
fail-fast: false
534+
matrix:
535+
os:
536+
- image_name: ubuntu-latest
537+
download_name: manylinux_x86_64
538+
python-version: [ "3.9", ]
539+
steps:
540+
- uses: actions/checkout@v4
541+
- name: Set up Python
542+
uses: actions/setup-python@v4
543+
with:
544+
python-version: ${{ matrix.python-version }}
545+
- name: Display Python version
546+
run: python -c "import sys; print(sys.version)"
547+
- name: Upgrade setuptools, pip and wheel
548+
run: python -m pip install -U setuptools pip wheel
549+
- name: Install tox
550+
run: python -m pip install tox>=4
551+
- name: Run tests
552+
run: python -m tox run -e aio-unsupported-python
553+
env:
554+
PYTHON_VERSION: ${{ matrix.python-version }}
555+
PYTEST_ADDOPTS: --color=yes --tb=short
556+
TOX_PARALLEL_NO_SPINNER: 1
557+
shell: bash
557558

558559
test-rockylinux9:
559560
name: Test Rocky Linux 9 rockylinux9-${{ matrix.python-version }}-${{ matrix.cloud-provider }}

.github/workflows/check_installation.yml

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -55,43 +55,44 @@ jobs:
5555
deactivate
5656
rm -rf test_no_boto_env
5757
58-
# test-installation-aioboto:
59-
# name: Test aioboto dependency
60-
# runs-on: ubuntu-latest
61-
# steps:
62-
# - uses: actions/checkout@v4
63-
64-
# - name: Set up Python
65-
# uses: actions/setup-python@v4
66-
# with:
67-
# python-version: 3.12
68-
69-
# - name: Test installation with [aio] (should include aioboto)
70-
# shell: bash
71-
# run: |
72-
# python -m venv test_no_boto_env
73-
# source test_no_boto_env/bin/activate
74-
75-
# python -m pip install '.[aio]'
76-
77-
# # Check that aioboto3 and aiobotocore are installed
78-
# pip freeze | grep aioboto || exit 1 # aioboto3 and aiobotocore should be installed
79-
80-
# # Deactivate and clean up
81-
# deactivate
82-
# rm -rf test_no_boto_env
83-
84-
# - name: Test [aio] installation with SNOWFLAKE_NO_BOTO=1 (should exclude aioboto)
85-
# shell: bash
86-
# run: |
87-
# python -m venv test_no_boto_env
88-
# source test_no_boto_env/bin/activate
89-
90-
# SNOWFLAKE_NO_BOTO=1 python -m pip install .
91-
92-
# # Check that boto3, botocore, aioboto, aiobotocore are NOT installed
93-
# pip freeze | grep boto && exit 1
94-
95-
# # Deactivate and clean up
96-
# deactivate
97-
# rm -rf test_no_boto_env
58+
test-installation-aioboto:
59+
if: false # temporarily disable aio
60+
name: Test aioboto dependency
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v4
64+
65+
- name: Set up Python
66+
uses: actions/setup-python@v4
67+
with:
68+
python-version: 3.12
69+
70+
- name: Test installation with [aio] (should include aioboto)
71+
shell: bash
72+
run: |
73+
python -m venv test_no_boto_env
74+
source test_no_boto_env/bin/activate
75+
76+
python -m pip install '.[aio]'
77+
78+
# Check that aioboto3 and aiobotocore are installed
79+
pip freeze | grep aioboto || exit 1 # aioboto3 and aiobotocore should be installed
80+
81+
# Deactivate and clean up
82+
deactivate
83+
rm -rf test_no_boto_env
84+
85+
- name: Test [aio] installation with SNOWFLAKE_NO_BOTO=1 (should exclude aioboto)
86+
shell: bash
87+
run: |
88+
python -m venv test_no_boto_env
89+
source test_no_boto_env/bin/activate
90+
91+
SNOWFLAKE_NO_BOTO=1 python -m pip install .
92+
93+
# Check that boto3, botocore, aioboto, aiobotocore are NOT installed
94+
pip freeze | grep boto && exit 1
95+
96+
# Deactivate and clean up
97+
deactivate
98+
rm -rf test_no_boto_env

ci/wif/test_wif.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export RUN_WIF_TESTS=true
1212
/opt/python/cp312-cp312/bin/python -m pip install --break-system-packages -e .
1313
/opt/python/cp312-cp312/bin/python -m pytest test/wif/ --ignore test/wif/test_wif_async.py
1414

15-
# test WIF with asyncio installed
16-
/opt/python/cp312-cp312/bin/python -m pip install --break-system-packages -e '.[aio]'
17-
/opt/python/cp312-cp312/bin/python -m pytest test/wif/
15+
# temporarily disable aio
16+
# # test WIF with asyncio installed
17+
# /opt/python/cp312-cp312/bin/python -m pip install --break-system-packages -e '.[aio]'
18+
# /opt/python/cp312-cp312/bin/python -m pytest test/wif/

0 commit comments

Comments
 (0)