diff --git a/.github/workflows/ci_integration.yml b/.github/workflows/ci_integration.yml index 231d8fbe..23836772 100644 --- a/.github/workflows/ci_integration.yml +++ b/.github/workflows/ci_integration.yml @@ -2,11 +2,8 @@ name: integration-tests on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - # Run once a day + workflow_call: + # Keep the schedule to maintain daily runs schedule: - cron: '0 0 * * *' diff --git a/.github/workflows/ci_static-analysis.yaml b/.github/workflows/ci_static-analysis.yaml index 08cda289..f1ef1ddc 100644 --- a/.github/workflows/ci_static-analysis.yaml +++ b/.github/workflows/ci_static-analysis.yaml @@ -2,9 +2,8 @@ name: static analysis on: - pull_request: - push: - # Run once a day + workflow_call: + # Keep the schedule to maintain daily runs schedule: - cron: '0 0 * * *' diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index fb308d0b..fa058fcb 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -2,9 +2,8 @@ name: tests on: - pull_request: - push: - # Run once a day + workflow_call: + # Keep the schedule to maintain daily runs schedule: - cron: '0 0 * * *' diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml new file mode 100644 index 00000000..146aae1b --- /dev/null +++ b/.github/workflows/pull.yml @@ -0,0 +1,27 @@ +name: Pull Request Checks + +on: + pull_request: + +jobs: + call-integration-tests: + name: Run Integration Tests + uses: ./.github/workflows/ci_integration.yml + call-static-analysis: + name: Run Static Analysis + uses: ./.github/workflows/ci_static-analysis.yaml + call-tests: + name: Run Tests + uses: ./.github/workflows/ci_tests.yaml + pr-ci-all-required: + if: always() + needs: + - call-integration-tests + - call-static-analysis + - call-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 00000000..5f48c1e8 --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,16 @@ +name: Push Checks + +on: + push: + branches: master + +jobs: + call-integration-tests: + name: Run Integration Tests + uses: ./.github/workflows/ci_integration.yml + call-static-analysis: + name: Run Static Analysis + uses: ./.github/workflows/ci_static-analysis.yaml + call-tests: + name: Run Tests + uses: ./.github/workflows/ci_tests.yaml diff --git a/codebuild/coverage/coverage.yml b/codebuild/coverage/coverage.yml deleted file mode 100644 index 51d8b0a6..00000000 --- a/codebuild/coverage/coverage.yml +++ /dev/null @@ -1,14 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "coverage" - -phases: - install: - runtime-versions: - python: latest - build: - commands: - - pip install "tox < 4.0" - - tox diff --git a/codebuild/python3.10.yml b/codebuild/python3.10.yml deleted file mode 100644 index ad76049f..00000000 --- a/codebuild/python3.10.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py310-integ-slow" - 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 - -phases: - install: - runtime-versions: - python: 3.10 - build: - commands: - - pip install "tox < 4.0" - - tox diff --git a/codebuild/python3.11.yml b/codebuild/python3.11.yml deleted file mode 100644 index b21cf15a..00000000 --- a/codebuild/python3.11.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py311-integ-slow" - 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 - -phases: - install: - runtime-versions: - python: 3.11 - build: - commands: - - pip install "tox < 4.0" - - tox diff --git a/codebuild/python3.12.yml b/codebuild/python3.12.yml deleted file mode 100644 index cf9e09ef..00000000 --- a/codebuild/python3.12.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py312-integ-slow" - 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 - -phases: - install: - runtime-versions: - python: latest - build: - commands: - - cd /root/.pyenv/plugins/python-build/../.. && git pull && cd - - - pyenv install --skip-existing 3.12.0 - - pyenv local 3.12.0 - - pip install --upgrade pip - - pip install setuptools - - pip install "tox < 4.0" - - tox diff --git a/codebuild/python3.7.yml b/codebuild/python3.7.yml deleted file mode 100644 index 6a51426a..00000000 --- a/codebuild/python3.7.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py37-integ-slow" - 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 - -phases: - install: - runtime-versions: - python: 3.7 - build: - commands: - - pip install "tox < 4.0" - - tox diff --git a/codebuild/python3.8.yml b/codebuild/python3.8.yml deleted file mode 100644 index 478a3bfc..00000000 --- a/codebuild/python3.8.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py38-integ-slow" - 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 - -phases: - install: - runtime-versions: - python: 3.8 - build: - commands: - - pip install "tox < 4.0" - - tox diff --git a/codebuild/python3.9.yml b/codebuild/python3.9.yml deleted file mode 100644 index f572e2a9..00000000 --- a/codebuild/python3.9.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py39-integ-slow" - 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 - -phases: - install: - runtime-versions: - python: 3.9 - build: - commands: - - pip install "tox < 4.0" - - tox