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

ci!: add e2e reusable workflow #9

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/reusable_canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
environment:
required: true
type: string
os:
required: true
type: string

jobs:
Canary:
Expand Down Expand Up @@ -48,7 +51,7 @@ jobs:
if: ${{inputs.branch == 'mainline'}}
uses: aws-actions/aws-codebuild-run-build@v1
with:
project-name: ${{inputs.repository}}-${{inputs.branch}}-Canary
project-name: ${{inputs.repository}}-${{inputs.branch}}-${{inputs.os}}-canary
hide-cloudwatch-logs: true
env-vars-for-codebuild: |
TEST_TYPE
Expand All @@ -59,6 +62,6 @@ jobs:
if: ${{inputs.branch == 'release'}}
uses: aws-actions/aws-codebuild-run-build@v1
with:
project-name: ${{inputs.repository}}-${{inputs.branch}}-Canary
project-name: ${{inputs.repository}}-${{inputs.branch}}-${{inputs.os}}-canary
source-version-override: refs/heads/release
hide-cloudwatch-logs: true
57 changes: 57 additions & 0 deletions .github/workflows/reusable_e2e_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "E2E Tests"

on:
workflow_call:
inputs:
repository:
required: true
type: string
branch:
required: true
type: string
environment:
required: true
type: string
os:
required: true
type: string

jobs:
E2ETests:
if: (github.repository == 'aws-deadline/${{inputs.repository}}')
name: E2E Tests
runs-on: ubuntu-latest
environment: ${{inputs.environment}}
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
with:
ref: ${{inputs.branch}}

- name: Configure AWS credentials for release
if: ${{inputs.branch == 'release'}}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_CODEBUILD_RELEASE_E2E_ROLE }}
aws-region: us-west-2
mask-aws-account-id: true

- name: Configure AWS credentials for mainline
if: ${{inputs.branch == 'mainline'}}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_CODEBUILD_MAINLINE_E2E_ROLE }}
aws-region: us-west-2
mask-aws-account-id: true

- name: Run E2E Tests
uses: aws-actions/aws-codebuild-run-build@v1
with:
project-name: ${{inputs.repository}}-${{inputs.branch}}-${{inputs.os}}-e2e
hide-cloudwatch-logs: true
env-vars-for-codebuild: |
TEST_TYPE
env:
TEST_TYPE: WHEEL
5 changes: 4 additions & 1 deletion .github/workflows/reusable_integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
environment:
required: true
type: string
os:
required: true
type: string

jobs:
IntegrationTests:
Expand Down Expand Up @@ -47,7 +50,7 @@ jobs:
- name: Run Integration Tests
uses: aws-actions/aws-codebuild-run-build@v1
with:
project-name: ${{inputs.repository}}-${{inputs.branch}}-IntegTest
project-name: ${{inputs.repository}}-${{inputs.branch}}-${{inputs.os}}-integ
hide-cloudwatch-logs: true
env-vars-for-codebuild: |
TEST_TYPE
Expand Down