Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(CI): Run CodeBuild CI from GHA #725

Merged
merged 20 commits into from
Nov 11, 2024
48 changes: 48 additions & 0 deletions .github/workflows/ci_codebuild-tests.yml
Original file line number Diff line number Diff line change
@@ -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 }}
3 changes: 2 additions & 1 deletion buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
25 changes: 25 additions & 0 deletions codebuild/py39/awses_local.yml
Original file line number Diff line number Diff line change
@@ -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
Loading