From b6c4d624c2379cc4ccd654089a1420ed498e933f Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Tue, 1 Jul 2025 14:46:57 -0700 Subject: [PATCH 01/20] chore(CI): migrate CB CI jobs to GHA --- .github/workflows/coverage.yml | 34 ++++++++++++++++ .github/workflows/python-examples.yml | 51 ++++++++++++++++++++++++ .github/workflows/python-integration.yml | 49 +++++++++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 .github/workflows/coverage.yml create mode 100644 .github/workflows/python-examples.yml create mode 100644 .github/workflows/python-integration.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..89c6ba0 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,34 @@ +# This workflow runs code coverage checks. +name: Code Coverage + +on: + pull_request: + push: + branches: + - master + # Run once a day + schedule: + - cron: '0 0 * * *' + +jobs: + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' # Using latest Python version + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install "tox < 4.0" + pip install -r dev_requirements/coverage-requirements.txt + + - name: Run coverage tests + env: + TOXENV: "coverage" + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: "arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f" + run: tox diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml new file mode 100644 index 0000000..bb4323e --- /dev/null +++ b/.github/workflows/python-examples.yml @@ -0,0 +1,51 @@ +name: Python Examples Tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + examples: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ['3.8.12', '3.9.7', '3.10.0', '3.11.0', '3.12.0'] + include: + - python-version: '3.8.12' + tox-env: 'py38-examples' + - python-version: '3.9.7' + tox-env: 'py39-examples' + - python-version: '3.10.0' + tox-env: 'py310-examples' + - python-version: '3.11.0' + tox-env: 'py311-examples' + - python-version: '3.12.0' + tox-env: 'py312-examples' + + env: + TOXENV: ${{ matrix.tox-env }} + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >- + arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >- + arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2 + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >- + arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install "tox < 4.0" + + - name: Run examples tests with tox + run: tox diff --git a/.github/workflows/python-integration.yml b/.github/workflows/python-integration.yml new file mode 100644 index 0000000..6b4d5ef --- /dev/null +++ b/.github/workflows/python-integration.yml @@ -0,0 +1,49 @@ +name: Python Integration Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + integration: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ['3.8.12', '3.9.7', '3.10.0', '3.11.0', '3.12.0'] + include: + - python-version: '3.8.12' + tox-env: 'py38-integ' + - python-version: '3.9.7' + tox-env: 'py39-integ' + - python-version: '3.10.0' + tox-env: 'py310-integ' + - python-version: '3.11.0' + tox-env: 'py311-integ' + - python-version: '3.12.0' + tox-env: 'py312-integ' + + env: + TOXENV: ${{ matrix.tox-env }} + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >- + arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >- + arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install "tox < 4.0" + + - name: Run integration tests with tox + run: tox From e32cb17df3776bb375475d358b8886803d7c1347 Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 10:37:38 -0700 Subject: [PATCH 02/20] add creds --- .github/workflows/python-examples.yml | 7 +++ .github/workflows/python-integration.yml | 7 +++ cfn.yml | 54 ++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 cfn.yml diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml index bb4323e..cb489b7 100644 --- a/.github/workflows/python-examples.yml +++ b/.github/workflows/python-examples.yml @@ -36,6 +36,13 @@ jobs: steps: - uses: actions/checkout@v3 + + - name: Configure AWS Credentials for Tests + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-ESDK-CLI-Role-us-west-2 + role-session-name: CLITests - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 diff --git a/.github/workflows/python-integration.yml b/.github/workflows/python-integration.yml index 6b4d5ef..98551e1 100644 --- a/.github/workflows/python-integration.yml +++ b/.github/workflows/python-integration.yml @@ -34,6 +34,13 @@ jobs: steps: - uses: actions/checkout@v3 + + - name: Configure AWS Credentials for Tests + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-ESDK-CLI-Role-us-west-2 + role-session-name: CLITests - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 diff --git a/cfn.yml b/cfn.yml new file mode 100644 index 0000000..c7728ef --- /dev/null +++ b/cfn.yml @@ -0,0 +1,54 @@ +AWSTemplateFormatVersion: "2010-09-09" +Description: "DDB Table and IAM Managed Policies/Role for AWS KMS Hierarchical Keyring Testing" + +Parameters: + ProjectName: + Type: String + Description: A prefix that will be applied to any names + Default: ESDK-CLI + GitHubRepo: + Type: String + Description: GitHub Repo that invokes CI + Default: aws/aws-encryption-sdk-cli + +Resources: + GitHubCIRole: + Type: 'AWS::IAM::Role' + Properties: + RoleName: !Sub "GitHub-CI-${ProjectName}-Role-${AWS::Region}" + Description: "Access KMS Resources for CI from GitHub" + ManagedPolicyArns: + - "arn:aws:iam::370957321024:policy/KMS-Public-CMK-EncryptDecrypt-Key-Access" + AssumeRolePolicyDocument: !Sub | + { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { "Federated": "arn:aws:iam::${AWS::AccountId}:oidc-provider/token.actions.githubusercontent.com" }, + "Action": "sts:AssumeRoleWithWebIdentity", + "Condition": { + "StringEquals": { + "token.actions.githubusercontent.com:aud": "sts.amazonaws.com" + }, + "StringLike": { + "token.actions.githubusercontent.com:sub": "repo:${GitHubRepo}:*" + } + } + }, + { + "Effect": "Allow", + "Principal": { + "AWS": "*" + }, + "Action": "sts:AssumeRole", + "Condition": { + "StringEquals": { + "aws:PrincipalArn": [ + "arn:aws:iam::${AWS::AccountId}:role/ToolsDevelopment" + ] + } + } + } + ] + } \ No newline at end of file From ccbd4782e13fa632c6024382af1b615df11152a2 Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 10:40:17 -0700 Subject: [PATCH 03/20] more --- .github/workflows/python-examples.yml | 4 +++- .github/workflows/python-integration.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml index cb489b7..d4172b0 100644 --- a/.github/workflows/python-examples.yml +++ b/.github/workflows/python-examples.yml @@ -24,7 +24,9 @@ jobs: tox-env: 'py311-examples' - python-version: '3.12.0' tox-env: 'py312-examples' - + permissions: + id-token: write + contents: read env: TOXENV: ${{ matrix.tox-env }} AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >- diff --git a/.github/workflows/python-integration.yml b/.github/workflows/python-integration.yml index 98551e1..d4cb0a2 100644 --- a/.github/workflows/python-integration.yml +++ b/.github/workflows/python-integration.yml @@ -24,7 +24,9 @@ jobs: tox-env: 'py311-integ' - python-version: '3.12.0' tox-env: 'py312-integ' - + permissions: + id-token: write + contents: read env: TOXENV: ${{ matrix.tox-env }} AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >- From 5a94a417a3826304ea3a76866f34cccc0fada617 Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 10:47:29 -0700 Subject: [PATCH 04/20] more --- .github/workflows/python-examples.yml | 2 +- .github/workflows/python-integration.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml index d4172b0..58002ba 100644 --- a/.github/workflows/python-examples.yml +++ b/.github/workflows/python-examples.yml @@ -8,7 +8,7 @@ on: jobs: examples: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/python-integration.yml b/.github/workflows/python-integration.yml index d4cb0a2..1bc2a0c 100644 --- a/.github/workflows/python-integration.yml +++ b/.github/workflows/python-integration.yml @@ -8,7 +8,7 @@ on: jobs: integration: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: From ef4754c6f4ec4c87b561aded72003bf41dab617b Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 10:51:02 -0700 Subject: [PATCH 05/20] more --- .github/workflows/python-examples.yml | 5 +++++ .github/workflows/python-integration.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml index 58002ba..3332b8e 100644 --- a/.github/workflows/python-examples.yml +++ b/.github/workflows/python-examples.yml @@ -55,6 +55,11 @@ jobs: run: | python -m pip install --upgrade pip pip install "tox < 4.0" + + - name: Install python version specific dependencies + if: matrix.python-version == '3.12.0' + run: | + pip install -r dev_requirements/ci-requirements.txt - name: Run examples tests with tox run: tox diff --git a/.github/workflows/python-integration.yml b/.github/workflows/python-integration.yml index 1bc2a0c..12ca419 100644 --- a/.github/workflows/python-integration.yml +++ b/.github/workflows/python-integration.yml @@ -53,6 +53,11 @@ jobs: run: | python -m pip install --upgrade pip pip install "tox < 4.0" + + - name: Install python version specific dependencies + if: matrix.python-version == '3.12.0' + run: | + pip install -r dev_requirements/ci-requirements.txt - name: Run integration tests with tox run: tox From 60f9472cff40a522eccea7d6f2d1e572c1795dba Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 10:58:55 -0700 Subject: [PATCH 06/20] more --- .github/workflows/python-examples.yml | 6 +++--- .github/workflows/python-integration.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml index 3332b8e..080abc6 100644 --- a/.github/workflows/python-examples.yml +++ b/.github/workflows/python-examples.yml @@ -12,13 +12,13 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8.12', '3.9.7', '3.10.0', '3.11.0', '3.12.0'] + python-version: ['3.8.12', '3.9', '3.10', '3.11.0', '3.12.0'] include: - python-version: '3.8.12' tox-env: 'py38-examples' - - python-version: '3.9.7' + - python-version: '3.9' tox-env: 'py39-examples' - - python-version: '3.10.0' + - python-version: '3.10' tox-env: 'py310-examples' - python-version: '3.11.0' tox-env: 'py311-examples' diff --git a/.github/workflows/python-integration.yml b/.github/workflows/python-integration.yml index 12ca419..976d563 100644 --- a/.github/workflows/python-integration.yml +++ b/.github/workflows/python-integration.yml @@ -12,13 +12,13 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8.12', '3.9.7', '3.10.0', '3.11.0', '3.12.0'] + python-version: ['3.8.12', '3.9', '3.10', '3.11.0', '3.12.0'] include: - python-version: '3.8.12' tox-env: 'py38-integ' - - python-version: '3.9.7' + - python-version: '3.9' tox-env: 'py39-integ' - - python-version: '3.10.0' + - python-version: '3.10' tox-env: 'py310-integ' - python-version: '3.11.0' tox-env: 'py311-integ' From 33157e2ec54f363f517663b4a01f7db35ddd6bad Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 11:08:32 -0700 Subject: [PATCH 07/20] m --- .github/workflows/coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 89c6ba0..333226a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -26,6 +26,7 @@ jobs: python -m pip install --upgrade pip pip install "tox < 4.0" pip install -r dev_requirements/coverage-requirements.txt + pip install -r dev_requirements/ci-requirements.txt - name: Run coverage tests env: From 8a89f6b9eb8059cca0df5e6b638c05a035dc95e6 Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 11:20:23 -0700 Subject: [PATCH 08/20] m --- .github/workflows/ci_static-analysis.yaml | 1 + .github/workflows/ci_tests.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_static-analysis.yaml b/.github/workflows/ci_static-analysis.yaml index 55f3b02..6096e81 100644 --- a/.github/workflows/ci_static-analysis.yaml +++ b/.github/workflows/ci_static-analysis.yaml @@ -3,6 +3,7 @@ name: static analysis on: pull_request: + branches: [ main ] push: # Run once a day schedule: diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 5bad6c4..8849d77 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -22,7 +22,7 @@ jobs: # x86 builds are only meaningful for Windows - os: windows-latest architecture: x86 - - os: macos-12 + - os: macos-13 architecture: x64 python: - 3.8 From c5cf1f92863ef9e179e1415fc624183fa65351d4 Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 11:22:07 -0700 Subject: [PATCH 09/20] m --- .github/workflows/install.yaml | 2 +- .github/workflows/python-examples.yml | 65 --------------------------- 2 files changed, 1 insertion(+), 66 deletions(-) delete mode 100644 .github/workflows/python-examples.yml diff --git a/.github/workflows/install.yaml b/.github/workflows/install.yaml index 7463680..de10153 100644 --- a/.github/workflows/install.yaml +++ b/.github/workflows/install.yaml @@ -22,7 +22,7 @@ jobs: # x86 builds are only meaningful for Windows - os: windows-latest architecture: x86 - - os: macos-latest + - os: macos-13 architecture: x64 python: - "3.12" diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml deleted file mode 100644 index 080abc6..0000000 --- a/.github/workflows/python-examples.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Python Examples Tests - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - examples: - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - python-version: ['3.8.12', '3.9', '3.10', '3.11.0', '3.12.0'] - include: - - python-version: '3.8.12' - tox-env: 'py38-examples' - - python-version: '3.9' - tox-env: 'py39-examples' - - python-version: '3.10' - tox-env: 'py310-examples' - - python-version: '3.11.0' - tox-env: 'py311-examples' - - python-version: '3.12.0' - tox-env: 'py312-examples' - permissions: - id-token: write - contents: read - env: - TOXENV: ${{ matrix.tox-env }} - AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >- - arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f - AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >- - arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2 - AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >- - arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 - - steps: - - uses: actions/checkout@v3 - - - name: Configure AWS Credentials for Tests - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-ESDK-CLI-Role-us-west-2 - role-session-name: CLITests - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install "tox < 4.0" - - - name: Install python version specific dependencies - if: matrix.python-version == '3.12.0' - run: | - pip install -r dev_requirements/ci-requirements.txt - - - name: Run examples tests with tox - run: tox From c89b599f146709c6e5245b1f5324842de791d722 Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 11:24:59 -0700 Subject: [PATCH 10/20] more --- .github/workflows/python-examples.yml | 65 +++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/python-examples.yml diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml new file mode 100644 index 0000000..080abc6 --- /dev/null +++ b/.github/workflows/python-examples.yml @@ -0,0 +1,65 @@ +name: Python Examples Tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + examples: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + python-version: ['3.8.12', '3.9', '3.10', '3.11.0', '3.12.0'] + include: + - python-version: '3.8.12' + tox-env: 'py38-examples' + - python-version: '3.9' + tox-env: 'py39-examples' + - python-version: '3.10' + tox-env: 'py310-examples' + - python-version: '3.11.0' + tox-env: 'py311-examples' + - python-version: '3.12.0' + tox-env: 'py312-examples' + permissions: + id-token: write + contents: read + env: + TOXENV: ${{ matrix.tox-env }} + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >- + arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >- + arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2 + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >- + arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 + + steps: + - uses: actions/checkout@v3 + + - name: Configure AWS Credentials for Tests + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-ESDK-CLI-Role-us-west-2 + role-session-name: CLITests + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install "tox < 4.0" + + - name: Install python version specific dependencies + if: matrix.python-version == '3.12.0' + run: | + pip install -r dev_requirements/ci-requirements.txt + + - name: Run examples tests with tox + run: tox From acab33fc983b179a61c2588c717899b2aaadb3fc Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 11:32:06 -0700 Subject: [PATCH 11/20] m --- .github/workflows/python-examples.yml | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml index 080abc6..0f8956b 100644 --- a/.github/workflows/python-examples.yml +++ b/.github/workflows/python-examples.yml @@ -46,20 +46,20 @@ jobs: role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-ESDK-CLI-Role-us-west-2 role-session-name: CLITests - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} + # - name: Set up Python ${{ matrix.python-version }} + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install "tox < 4.0" + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # pip install "tox < 4.0" - - name: Install python version specific dependencies - if: matrix.python-version == '3.12.0' - run: | - pip install -r dev_requirements/ci-requirements.txt + # - name: Install python version specific dependencies + # if: matrix.python-version == '3.12.0' + # run: | + # pip install -r dev_requirements/ci-requirements.txt - - name: Run examples tests with tox - run: tox + # - name: Run examples tests with tox + # run: tox From 492566b8637015f25b46b5b10a08908f80dafafa Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 11:33:31 -0700 Subject: [PATCH 12/20] m --- .github/workflows/python-examples.yml | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml index 0f8956b..5ca373e 100644 --- a/.github/workflows/python-examples.yml +++ b/.github/workflows/python-examples.yml @@ -2,9 +2,9 @@ name: Python Examples Tests on: push: - branches: [ main ] + branches: [ master ] pull_request: - branches: [ main ] + branches: [ master ] jobs: examples: @@ -46,20 +46,20 @@ jobs: role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-ESDK-CLI-Role-us-west-2 role-session-name: CLITests - # - name: Set up Python ${{ matrix.python-version }} - # uses: actions/setup-python@v4 - # with: - # python-version: ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # pip install "tox < 4.0" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install "tox < 4.0" - # - name: Install python version specific dependencies - # if: matrix.python-version == '3.12.0' - # run: | - # pip install -r dev_requirements/ci-requirements.txt + - name: Install python version specific dependencies + if: matrix.python-version == '3.12.0' + run: | + pip install -r dev_requirements/ci-requirements.txt - # - name: Run examples tests with tox - # run: tox + - name: Run examples tests with tox + run: tox From 6f6937c1a08f93d9036e1cba8a843985b167e18e Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 11:47:04 -0700 Subject: [PATCH 13/20] m --- .github/workflows/ci_tests.yaml | 2 +- .github/workflows/coverage.yml | 35 --------------------------------- .github/workflows/install.yaml | 2 +- 3 files changed, 2 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 8849d77..59cbb91 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -22,7 +22,7 @@ jobs: # x86 builds are only meaningful for Windows - os: windows-latest architecture: x86 - - os: macos-13 + - os: macos-latest architecture: x64 python: - 3.8 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 333226a..0000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,35 +0,0 @@ -# This workflow runs code coverage checks. -name: Code Coverage - -on: - pull_request: - push: - branches: - - master - # Run once a day - schedule: - - cron: '0 0 * * *' - -jobs: - coverage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.12' # Using latest Python version - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install "tox < 4.0" - pip install -r dev_requirements/coverage-requirements.txt - pip install -r dev_requirements/ci-requirements.txt - - - name: Run coverage tests - env: - TOXENV: "coverage" - AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: "arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f" - run: tox diff --git a/.github/workflows/install.yaml b/.github/workflows/install.yaml index de10153..7463680 100644 --- a/.github/workflows/install.yaml +++ b/.github/workflows/install.yaml @@ -22,7 +22,7 @@ jobs: # x86 builds are only meaningful for Windows - os: windows-latest architecture: x86 - - os: macos-13 + - os: macos-latest architecture: x64 python: - "3.12" From 79ddcbd465d4c32c9b872f3e761542a30c8eb5bd Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 12:03:25 -0700 Subject: [PATCH 14/20] m --- .github/workflows/ci_tests.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 59cbb91..b6dca39 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -22,6 +22,8 @@ jobs: # x86 builds are only meaningful for Windows - os: windows-latest architecture: x86 + - os: macos-13 + architecture: x64 - os: macos-latest architecture: x64 python: @@ -30,6 +32,9 @@ jobs: - "3.10" - "3.11" - "3.12" + python-macos-latest: + - "3.11" + - "3.12" category: - local # These require credentials. @@ -38,9 +43,16 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 + if: matrix.platform.os != 'macos-latest' with: python-version: ${{ matrix.python }} architecture: ${{ matrix.platform.architecture }} + + - uses: actions/setup-python@v4 + if: matrix.platform.os == 'macos-latest' + with: + python-version: ${{ matrix.python-macos-latest }} + architecture: ${{ matrix.platform.architecture }} - run: | python -m pip install --upgrade pip pip install --upgrade -r dev_requirements/ci-requirements.txt From 21c09bede0d731a7fa8a038430f65688f9f3fe6c Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 12:05:37 -0700 Subject: [PATCH 15/20] m --- .github/workflows/ci_tests.yaml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index b6dca39..8849d77 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -24,17 +24,12 @@ jobs: architecture: x86 - os: macos-13 architecture: x64 - - os: macos-latest - architecture: x64 python: - 3.8 - 3.9 - "3.10" - "3.11" - "3.12" - python-macos-latest: - - "3.11" - - "3.12" category: - local # These require credentials. @@ -43,16 +38,9 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 - if: matrix.platform.os != 'macos-latest' with: python-version: ${{ matrix.python }} architecture: ${{ matrix.platform.architecture }} - - - uses: actions/setup-python@v4 - if: matrix.platform.os == 'macos-latest' - with: - python-version: ${{ matrix.python-macos-latest }} - architecture: ${{ matrix.platform.architecture }} - run: | python -m pip install --upgrade pip pip install --upgrade -r dev_requirements/ci-requirements.txt From 990ec565d55ea565dea7ffeb23a1f9928d54f9c5 Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 12:44:45 -0700 Subject: [PATCH 16/20] m --- .github/workflows/ci_static-analysis.yaml | 2 +- .github/workflows/python-examples.yml | 8 ++++---- .github/workflows/python-integration.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_static-analysis.yaml b/.github/workflows/ci_static-analysis.yaml index 6096e81..f0784a7 100644 --- a/.github/workflows/ci_static-analysis.yaml +++ b/.github/workflows/ci_static-analysis.yaml @@ -3,7 +3,7 @@ name: static analysis on: pull_request: - branches: [ main ] + branches: [ master ] push: # Run once a day schedule: diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml index 5ca373e..e801b7d 100644 --- a/.github/workflows/python-examples.yml +++ b/.github/workflows/python-examples.yml @@ -12,17 +12,17 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8.12', '3.9', '3.10', '3.11.0', '3.12.0'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] include: - - python-version: '3.8.12' + - python-version: '3.8' tox-env: 'py38-examples' - python-version: '3.9' tox-env: 'py39-examples' - python-version: '3.10' tox-env: 'py310-examples' - - python-version: '3.11.0' + - python-version: '3.11' tox-env: 'py311-examples' - - python-version: '3.12.0' + - python-version: '3.12' tox-env: 'py312-examples' permissions: id-token: write diff --git a/.github/workflows/python-integration.yml b/.github/workflows/python-integration.yml index 976d563..9f5eef7 100644 --- a/.github/workflows/python-integration.yml +++ b/.github/workflows/python-integration.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8.12', '3.9', '3.10', '3.11.0', '3.12.0'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] include: - python-version: '3.8.12' tox-env: 'py38-integ' From 409ad23c6d718767ec6d90cc20eb09cfe4f771e9 Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 12:46:51 -0700 Subject: [PATCH 17/20] whoopsie made an oopsie --- .github/workflows/python-examples.yml | 2 +- .github/workflows/python-integration.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml index e801b7d..f8197cd 100644 --- a/.github/workflows/python-examples.yml +++ b/.github/workflows/python-examples.yml @@ -57,7 +57,7 @@ jobs: pip install "tox < 4.0" - name: Install python version specific dependencies - if: matrix.python-version == '3.12.0' + if: matrix.python-version == '3.12' run: | pip install -r dev_requirements/ci-requirements.txt diff --git a/.github/workflows/python-integration.yml b/.github/workflows/python-integration.yml index 9f5eef7..8d787df 100644 --- a/.github/workflows/python-integration.yml +++ b/.github/workflows/python-integration.yml @@ -55,7 +55,7 @@ jobs: pip install "tox < 4.0" - name: Install python version specific dependencies - if: matrix.python-version == '3.12.0' + if: matrix.python-version == '3.12' run: | pip install -r dev_requirements/ci-requirements.txt From 212a64bf6c2eda1fe7a2c53ca0402eb93b9218db Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 12:50:41 -0700 Subject: [PATCH 18/20] another --- .github/workflows/python-integration.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-integration.yml b/.github/workflows/python-integration.yml index 8d787df..009eb1f 100644 --- a/.github/workflows/python-integration.yml +++ b/.github/workflows/python-integration.yml @@ -20,9 +20,9 @@ jobs: tox-env: 'py39-integ' - python-version: '3.10' tox-env: 'py310-integ' - - python-version: '3.11.0' + - python-version: '3.11' tox-env: 'py311-integ' - - python-version: '3.12.0' + - python-version: '3.12' tox-env: 'py312-integ' permissions: id-token: write From 1c152719527b569ae8769add9e677623f291adbd Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 14:38:31 -0700 Subject: [PATCH 19/20] m --- .github/workflows/python-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-integration.yml b/.github/workflows/python-integration.yml index 009eb1f..820c069 100644 --- a/.github/workflows/python-integration.yml +++ b/.github/workflows/python-integration.yml @@ -14,7 +14,7 @@ jobs: matrix: python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] include: - - python-version: '3.8.12' + - python-version: '3.8' tox-env: 'py38-integ' - python-version: '3.9' tox-env: 'py39-integ' From ccf4b592e220319eef2afaa0f789d4c9e5c93bec Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Wed, 2 Jul 2025 15:02:58 -0700 Subject: [PATCH 20/20] lil comment --- .github/workflows/python-examples.yml | 3 ++- .github/workflows/python-integration.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml index f8197cd..11ef847 100644 --- a/.github/workflows/python-examples.yml +++ b/.github/workflows/python-examples.yml @@ -55,7 +55,8 @@ jobs: run: | python -m pip install --upgrade pip pip install "tox < 4.0" - + + # Python no longer bundles setuptools starting in 3.12 - name: Install python version specific dependencies if: matrix.python-version == '3.12' run: | diff --git a/.github/workflows/python-integration.yml b/.github/workflows/python-integration.yml index 820c069..1c6a56a 100644 --- a/.github/workflows/python-integration.yml +++ b/.github/workflows/python-integration.yml @@ -54,6 +54,7 @@ jobs: python -m pip install --upgrade pip pip install "tox < 4.0" + # Python no longer bundles setuptools starting in 3.12 - name: Install python version specific dependencies if: matrix.python-version == '3.12' run: |