From ee1529d48ff18686e4282f002430ada89ac3c33a Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Thu, 3 Jul 2025 11:23:15 -0700 Subject: [PATCH 1/2] chore(CI): clean up gha and unused files --- .github/workflows/ci_static-analysis.yaml | 8 ++----- .github/workflows/ci_tests.yaml | 8 ++----- .github/workflows/daily_ci.yml | 23 +++++++++++++++++++ .github/workflows/install.yaml | 8 ++----- .github/workflows/pull.yml | 27 +++++++++++++++++++++++ .github/workflows/push.yml | 16 ++++++++++++++ codebuild/py310/examples.yml | 22 ------------------ codebuild/py310/integ.yml | 20 ----------------- codebuild/py311/examples.yml | 20 ----------------- codebuild/py311/integ.yml | 18 --------------- codebuild/py312/examples.yml | 20 ----------------- codebuild/py312/integ.yml | 18 --------------- codebuild/py38/examples.yml | 22 ------------------ codebuild/py38/integ.yml | 20 ----------------- codebuild/py39/examples.yml | 22 ------------------ codebuild/py39/integ.yml | 20 ----------------- 16 files changed, 72 insertions(+), 220 deletions(-) create mode 100644 .github/workflows/daily_ci.yml create mode 100644 .github/workflows/pull.yml create mode 100644 .github/workflows/push.yml delete mode 100644 codebuild/py310/examples.yml delete mode 100644 codebuild/py310/integ.yml delete mode 100644 codebuild/py311/examples.yml delete mode 100644 codebuild/py311/integ.yml delete mode 100644 codebuild/py312/examples.yml delete mode 100644 codebuild/py312/integ.yml delete mode 100644 codebuild/py38/examples.yml delete mode 100644 codebuild/py38/integ.yml delete mode 100644 codebuild/py39/examples.yml delete mode 100644 codebuild/py39/integ.yml diff --git a/.github/workflows/ci_static-analysis.yaml b/.github/workflows/ci_static-analysis.yaml index 55f3b02..8230a8f 100644 --- a/.github/workflows/ci_static-analysis.yaml +++ b/.github/workflows/ci_static-analysis.yaml @@ -1,12 +1,8 @@ -# This workflow runs static analysis checks on pull requests. +# This workflow runs static analysis checks. name: static analysis on: - pull_request: - push: - # Run once a day - schedule: - - cron: '0 0 * * *' + workflow_call: jobs: analysis: diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 5bad6c4..c9b26b2 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -1,12 +1,8 @@ -# This workflow runs tests on pull requests. +# This workflow runs tests. name: tests on: - pull_request: - push: - # Run once a day - schedule: - - cron: '0 0 * * *' + workflow_call: jobs: tests: diff --git a/.github/workflows/daily_ci.yml b/.github/workflows/daily_ci.yml new file mode 100644 index 0000000..e3c07b9 --- /dev/null +++ b/.github/workflows/daily_ci.yml @@ -0,0 +1,23 @@ +# This workflow runs every weekday at 15:00 UTC (8AM PDT) +name: Daily CI + +on: + schedule: + - cron: "00 15 * * 1-5" + +jobs: + static-analysis: + # Don't run the cron builds on forks + if: github.event_name != 'schedule' || github.repository_owner == 'aws' + name: Static Analysis + uses: ./.github/workflows/ci_static-analysis.yaml + tests: + # Don't run the cron builds on forks + if: github.event_name != 'schedule' || github.repository_owner == 'aws' + name: Run Tests + uses: ./.github/workflows/ci_tests.yaml + install-tests: + # Don't run the cron builds on forks + if: github.event_name != 'schedule' || github.repository_owner == 'aws' + name: Installation Tests + uses: ./.github/workflows/install.yaml \ No newline at end of file diff --git a/.github/workflows/install.yaml b/.github/workflows/install.yaml index 7463680..ed3f87b 100644 --- a/.github/workflows/install.yaml +++ b/.github/workflows/install.yaml @@ -1,12 +1,8 @@ -# This workflow runs tests on pull requests. +# This workflow runs installation tests. name: venv-tests on: - pull_request: - push: - # Run once a day - schedule: - - cron: '0 0 * * *' + workflow_call: jobs: tests: diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml new file mode 100644 index 0000000..c39e335 --- /dev/null +++ b/.github/workflows/pull.yml @@ -0,0 +1,27 @@ +name: Pull Request Checks + +on: + pull_request: + +jobs: + static-analysis: + name: Static Analysis + uses: ./.github/workflows/ci_static-analysis.yaml + tests: + name: Run Tests + uses: ./.github/workflows/ci_tests.yaml + install-tests: + name: Installation Tests + uses: ./.github/workflows/install.yaml + pr-ci-all-required: + if: always() + needs: + - tests + - static-analysis + - install-tests + runs-on: ubuntu-22.04 + steps: + - name: Verify all required jobs passed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..8bc596e --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,16 @@ +name: Pull Request Checks + +on: + push: + branches: master + +jobs: + static-analysis: + name: Static Analysis + uses: ./.github/workflows/ci_static-analysis.yaml + tests: + name: Run Tests + uses: ./.github/workflows/ci_tests.yaml + install-tests: + name: Installation Tests + uses: ./.github/workflows/install.yaml diff --git a/codebuild/py310/examples.yml b/codebuild/py310/examples.yml deleted file mode 100644 index c01e5d8..0000000 --- a/codebuild/py310/examples.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py310-examples" - 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 - -phases: - install: - runtime-versions: - python: latest - build: - commands: - - pyenv install 3.10.0 - - pyenv local 3.10.0 - - pip install "tox < 4.0" - - tox diff --git a/codebuild/py310/integ.yml b/codebuild/py310/integ.yml deleted file mode 100644 index ea7f3ba..0000000 --- a/codebuild/py310/integ.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py310-integ" - 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 - -phases: - install: - runtime-versions: - python: latest - build: - commands: - - pyenv install 3.10.0 - - pyenv local 3.10.0 - - pip install "tox < 4.0" - - tox diff --git a/codebuild/py311/examples.yml b/codebuild/py311/examples.yml deleted file mode 100644 index f4c04e3..0000000 --- a/codebuild/py311/examples.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py311-examples" - 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 - -phases: - install: - runtime-versions: - python: 3.11 - build: - commands: - - pip install -r dev_requirements/ci-requirements.txt - - tox diff --git a/codebuild/py311/integ.yml b/codebuild/py311/integ.yml deleted file mode 100644 index f7c7f74..0000000 --- a/codebuild/py311/integ.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py311-integ" - 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 - -phases: - install: - runtime-versions: - python: 3.11 - build: - commands: - - pip install -r dev_requirements/ci-requirements.txt - - tox diff --git a/codebuild/py312/examples.yml b/codebuild/py312/examples.yml deleted file mode 100644 index 4e41cdb..0000000 --- a/codebuild/py312/examples.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py312-examples" - 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 - -phases: - install: - runtime-versions: - python: 3.12 - build: - commands: - - pip install -r dev_requirements/ci-requirements.txt - - tox diff --git a/codebuild/py312/integ.yml b/codebuild/py312/integ.yml deleted file mode 100644 index f7470b0..0000000 --- a/codebuild/py312/integ.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py312-integ" - 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 - -phases: - install: - runtime-versions: - python: 3.12 - build: - commands: - - pip install -r dev_requirements/ci-requirements.txt - - tox diff --git a/codebuild/py38/examples.yml b/codebuild/py38/examples.yml deleted file mode 100644 index 5e5e0a4..0000000 --- a/codebuild/py38/examples.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py38-examples" - 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 - -phases: - install: - runtime-versions: - python: latest - build: - commands: - - pyenv install 3.8.12 - - pyenv local 3.8.12 - - pip install "tox < 4.0" - - tox diff --git a/codebuild/py38/integ.yml b/codebuild/py38/integ.yml deleted file mode 100644 index 6bd310f..0000000 --- a/codebuild/py38/integ.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py38-integ" - 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 - -phases: - install: - runtime-versions: - python: latest - build: - commands: - - pyenv install 3.8.12 - - pyenv local 3.8.12 - - pip install "tox < 4.0" - - tox diff --git a/codebuild/py39/examples.yml b/codebuild/py39/examples.yml deleted file mode 100644 index 3493555..0000000 --- a/codebuild/py39/examples.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py39-examples" - 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 - -phases: - install: - runtime-versions: - python: latest - build: - commands: - - pyenv install 3.9.7 - - pyenv local 3.9.7 - - pip install "tox < 4.0" - - tox diff --git a/codebuild/py39/integ.yml b/codebuild/py39/integ.yml deleted file mode 100644 index 23c6722..0000000 --- a/codebuild/py39/integ.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py39-integ" - 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 - -phases: - install: - runtime-versions: - python: latest - build: - commands: - - pyenv install 3.9.7 - - pyenv local 3.9.7 - - pip install "tox < 4.0" - - tox From 5b53f0833e90753e2fdebb6757d8fac62746d764 Mon Sep 17 00:00:00 2001 From: Jose Corella Date: Thu, 3 Jul 2025 11:57:04 -0700 Subject: [PATCH 2/2] sigh --- .github/workflows/daily_ci.yml | 12 +++++++++++- .github/workflows/pull.yml | 6 ++++++ .github/workflows/push.yml | 6 ++++++ .github/workflows/python-examples.yml | 5 +---- .github/workflows/python-integration.yml | 5 +---- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/.github/workflows/daily_ci.yml b/.github/workflows/daily_ci.yml index e3c07b9..8b0c096 100644 --- a/.github/workflows/daily_ci.yml +++ b/.github/workflows/daily_ci.yml @@ -20,4 +20,14 @@ jobs: # Don't run the cron builds on forks if: github.event_name != 'schedule' || github.repository_owner == 'aws' name: Installation Tests - uses: ./.github/workflows/install.yaml \ No newline at end of file + uses: ./.github/workflows/install.yaml + integ-tests: + # Don't run the cron builds on forks + if: github.event_name != 'schedule' || github.repository_owner == 'aws' + name: Integ Tests + uses: ./.github/workflows/python-integration.yml + examples: + # Don't run the cron builds on forks + if: github.event_name != 'schedule' || github.repository_owner == 'aws' + name: Example Tests + uses: ./.github/workflows/python-examples.yml \ No newline at end of file diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index c39e335..d1b7cb4 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -13,6 +13,12 @@ jobs: install-tests: name: Installation Tests uses: ./.github/workflows/install.yaml + integration-tests: + name: Integ Tests + uses: ./.github/workflows/python-integration.yml + examples: + name: Example Tests + uses: ./.github/workflows/python-examples.yml pr-ci-all-required: if: always() needs: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 8bc596e..f419a6a 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -14,3 +14,9 @@ jobs: install-tests: name: Installation Tests uses: ./.github/workflows/install.yaml + integ-tests: + name: Integ Tests + uses: ./.github/workflows/python-integration.yml + examples: + name: Example Tests + uses: ./.github/workflows/python-examples.yml diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml index 11ef847..8986644 100644 --- a/.github/workflows/python-examples.yml +++ b/.github/workflows/python-examples.yml @@ -1,10 +1,7 @@ name: Python Examples Tests on: - push: - branches: [ master ] - pull_request: - branches: [ master ] + workflow_call: jobs: examples: diff --git a/.github/workflows/python-integration.yml b/.github/workflows/python-integration.yml index 1c6a56a..2a400f5 100644 --- a/.github/workflows/python-integration.yml +++ b/.github/workflows/python-integration.yml @@ -1,10 +1,7 @@ name: Python Integration Tests on: - push: - branches: [ master ] - pull_request: - branches: [ master ] + workflow_call: jobs: integration: