diff --git a/.github/workflows/ci_codebuild-tests.yml b/.github/workflows/ci_codebuild-tests.yml new file mode 100644 index 000000000..2e84fc897 --- /dev/null +++ b/.github/workflows/ci_codebuild-tests.yml @@ -0,0 +1,48 @@ +name: AWS CodeBuild CI + +on: + pull_request: + push: + # Run once a day + schedule: + - cron: "0 0 * * *" + +permissions: + id-token: write + contents: read + +jobs: + codebuild-tests: + name: AWS CodeBuild CI + runs-on: ubuntu-latest + strategy: + matrix: + python: + - python_version: "38" + image: "aws/codebuild/standard:5.0" + - python_version: "39" + image: "aws/codebuild/standard:5.0" + - python_version: "310" + image: "aws/codebuild/standard:6.0" + - python_version: "311" + image: "aws/codebuild/standard:7.0" + - python_version: "312" + image: "aws/codebuild/standard:7.0" + codebuild_file_name: + - "awses_local.yml" + - "examples.yml" + - "integ.yml" + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} + aws-region: us-west-2 + role-duration-seconds: 3600 + - name: Run python-${{ matrix.python.python_version }} ${{ matrix.codebuild_file_name }} + uses: aws-actions/aws-codebuild-run-build@v1 + timeout-minutes: 60 + with: + project-name: python-esdk + buildspec-override: codebuild/py${{ matrix.python.python_version }}/${{ matrix.codebuild_file_name }} + image-override: ${{ matrix.python.image }} diff --git a/buildspec.yml b/buildspec.yml index 9bf6eafdf..d9604281f 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -24,7 +24,8 @@ batch: buildspec: codebuild/py39/examples.yml env: image: aws/codebuild/standard:5.0 - - identifier: py39_awses_latest + - identifier: py39_awses_local + buildspec: codebuild/py39/awses_local.yml env: image: aws/codebuild/standard:5.0 diff --git a/codebuild/py39/awses_local.yml b/codebuild/py39/awses_local.yml new file mode 100644 index 000000000..e56a9ff45 --- /dev/null +++ b/codebuild/py39/awses_local.yml @@ -0,0 +1,25 @@ +version: 0.2 + +env: + variables: + TOXENV: "py39-awses_local" + 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-west-2:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_2: >- + arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 + AWS_ENCRYPTION_SDK_PYTHON_DECRYPT_ORACLE_API_DEPLOYMENT_ID: "xi1mwx3ttb" + AWS_ENCRYPTION_SDK_PYTHON_DECRYPT_ORACLE_REGION: "us-west-2" + +phases: + install: + runtime-versions: + python: 3.9 + build: + commands: + - pip install "tox < 4.0" + - cd test_vector_handlers + - tox