From f322a126ee94ef081898dd25063457b6dca674b0 Mon Sep 17 00:00:00 2001 From: aws-donocl Date: Fri, 16 Aug 2024 15:22:08 -0700 Subject: [PATCH 1/3] Create main.yml Signed-off-by: aws-donocl --- .github/workflows/main.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..a4aaf3f6 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,39 @@ +# This is a basic workflow to help you get started with Actions + +name: Pull Request + +# Controls when the workflow will run +on: + # Triggers the workflow on pull request events but only for the "main" branch + pull_request: + branches: [ "main" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +permissions: + id-token: write # This is required for requesting the JWT + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + run-tests: + runs-on: ubuntu-latest + steps: + - name: Configure AWS Credentials + # You may pin to the exact commit or the version. + # uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 + uses: aws-actions/configure-aws-credentials@v4 + with: + # AWS Region, e.g. us-east-2 + aws-region: us-east-1 + # The Amazon Resource Name (ARN) of the role to assume. Use the provided credentials to assume an IAM role and configure the Actions environment with the assumed role credentials rather than with the provided credentials. + role-to-assume: ${{ secrets.AWS_CODE_BUILD_ROLE_ARN }} # optional + # Role duration in seconds. Default is one hour. + # role-duration-seconds: # optional + audience: sts.amazonaws.com + - name: Run CodeBuild + uses: aws-actions/aws-codebuild-run-build@v1 + with: + project-name: CodeEditorTesting + source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}' + From db98fb661a38609a3cacb30206f93e8c0bdc41ea Mon Sep 17 00:00:00 2001 From: aws-donocl Date: Fri, 23 Aug 2024 11:01:14 -0700 Subject: [PATCH 2/3] Update main.yml Signed-off-by: aws-donocl --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a4aaf3f6..2ca1b038 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,8 @@ jobs: # AWS Region, e.g. us-east-2 aws-region: us-east-1 # The Amazon Resource Name (ARN) of the role to assume. Use the provided credentials to assume an IAM role and configure the Actions environment with the assumed role credentials rather than with the provided credentials. - role-to-assume: ${{ secrets.AWS_CODE_BUILD_ROLE_ARN }} # optional + # role-to-assume: ${{ secrets.AWS_CODE_BUILD_ROLE_ARN }} # optional + role-to-assume: ${{ secrets.AWS_CODE_BUILD_TESTING_ARN }} # Role duration in seconds. Default is one hour. # role-duration-seconds: # optional audience: sts.amazonaws.com From 0b8daa6a69dd717fc3f3797c7608df21531bb39c Mon Sep 17 00:00:00 2001 From: Donovan Clay Date: Fri, 23 Aug 2024 12:43:29 -0700 Subject: [PATCH 3/3] **Description** Create a Github Action that trigger's the test infrastructure running on code build. **Testing Done** I have developed and tested this workflow from my own fork of the repository. --- .github/workflows/{main.yml => codebuild-ci.yml} | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) rename .github/workflows/{main.yml => codebuild-ci.yml} (63%) diff --git a/.github/workflows/main.yml b/.github/workflows/codebuild-ci.yml similarity index 63% rename from .github/workflows/main.yml rename to .github/workflows/codebuild-ci.yml index 2ca1b038..1674739f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/codebuild-ci.yml @@ -1,6 +1,4 @@ -# This is a basic workflow to help you get started with Actions - -name: Pull Request +name: Pull Request Checks # Controls when the workflow will run on: @@ -14,23 +12,16 @@ on: permissions: id-token: write # This is required for requesting the JWT -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: run-tests: runs-on: ubuntu-latest steps: - name: Configure AWS Credentials - # You may pin to the exact commit or the version. - # uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 uses: aws-actions/configure-aws-credentials@v4 with: - # AWS Region, e.g. us-east-2 aws-region: us-east-1 # The Amazon Resource Name (ARN) of the role to assume. Use the provided credentials to assume an IAM role and configure the Actions environment with the assumed role credentials rather than with the provided credentials. - # role-to-assume: ${{ secrets.AWS_CODE_BUILD_ROLE_ARN }} # optional - role-to-assume: ${{ secrets.AWS_CODE_BUILD_TESTING_ARN }} - # Role duration in seconds. Default is one hour. - # role-duration-seconds: # optional + role-to-assume: ${{ secrets.AWS_CODE_BUILD_ROLE_ARN }} # optional audience: sts.amazonaws.com - name: Run CodeBuild uses: aws-actions/aws-codebuild-run-build@v1