Skip to content

Commit

Permalink
Integ test neuron (#1276)
Browse files Browse the repository at this point in the history
merging changes from test branch on fork to test branch on parent repo
  • Loading branch information
aditya-purang authored Aug 8, 2024
1 parent 5443951 commit eddc488
Show file tree
Hide file tree
Showing 88 changed files with 5,369 additions and 4,375 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/PR-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,6 @@ jobs:
if: steps.cached_binaries.outputs.cache-hit != 'true' && needs.changes.outputs.build == 'true'
run: make test

- name: Upload coverage to Codecov
if: steps.cached_binaries.outputs.cache-hit != 'true' && needs.changes.outputs.build == 'true'
uses: codecov/codecov-action@v3
with:
verbose: true

- name: Build
if: steps.cached_binaries.outputs.cache-hit != 'true' && needs.changes.outputs.build == 'true'
run: make amazon-cloudwatch-agent-${{ matrix.family }}
Expand Down
53 changes: 39 additions & 14 deletions .github/workflows/application-signals-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@
# This is a reusable workflow for running the E2E test for Application Signals.
# It is meant to be called from another workflow.
# Read more about reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows#overview
name: E2E Testing
name: Application Signals E2E Test
on:
workflow_call:
workflow_dispatch:
inputs:
build_run_id:
description: 'The ID of the build-test-artifacts workflow run'
type: number
required: true

permissions:
id-token: write
Expand All @@ -18,70 +23,90 @@ concurrency:


jobs:
CheckBuildTestArtifacts:
runs-on: ubuntu-latest
steps:
- run: |
conclusion=$(gh run view ${{ inputs.build_run_id }} --repo $GITHUB_REPOSITORY --json conclusion -q '.conclusion')
if [[ $conclusion == "success" ]]; then
echo "Run succeeded"
else
echo "Run failed"
exit 1
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
java-eks-e2e-test:
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-eks-e2e-test.yml@consolidate-release
needs: CheckBuildTestArtifacts
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-eks-e2e-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
test-cluster-name: 'e2e-cw-agent-test'
caller-workflow-name: 'main-build'

java-ec2-default-e2e-test:
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-ec2-default-e2e-test.yml@consolidate-release
needs: CheckBuildTestArtifacts
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-ec2-default-e2e-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
caller-workflow-name: 'main-build'

java-ec2-asg-e2e-test:
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-ec2-asg-e2e-test.yml@consolidate-release
needs: [ CheckBuildTestArtifacts ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-ec2-asg-e2e-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
caller-workflow-name: 'main-build'

java-metric-limiter-e2e-test:
needs: [ java-eks-e2e-test ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-eks-e2e-test.yml@consolidate-release
needs: [ CheckBuildTestArtifacts, java-eks-e2e-test ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-metric-limiter-e2e-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
test-cluster-name: 'e2e-cw-agent-test'
caller-workflow-name: 'main-build'

java-k8s-e2e-test:
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-k8s-e2e-test.yml@consolidate-release
needs: [ CheckBuildTestArtifacts ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-k8s-e2e-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
caller-workflow-name: 'main-build'

python-eks-e2e-test:
needs: [ java-metric-limiter-e2e-test ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-eks-e2e-test.yml@consolidate-release
needs: [ CheckBuildTestArtifacts, java-metric-limiter-e2e-test ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-eks-e2e-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
test-cluster-name: 'e2e-cw-agent-test'
caller-workflow-name: 'main-build'

python-ec2-default-e2e-test:
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-default-e2e-test.yml@consolidate-release
needs: [ CheckBuildTestArtifacts ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-default-e2e-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
caller-workflow-name: 'main-build'

python-ec2-asg-e2e-test:
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-asg-e2e-test.yml@consolidate-release
needs: [ CheckBuildTestArtifacts ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-asg-e2e-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
caller-workflow-name: 'main-build'

python-k8s-e2e-test:
needs: [ java-k8s-e2e-test ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-k8s-e2e-test.yml@consolidate-release
needs: [ CheckBuildTestArtifacts, java-k8s-e2e-test ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-k8s-e2e-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
Expand Down
101 changes: 101 additions & 0 deletions .github/workflows/build-test-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT

name: Build Test Artifacts
on:
push:
branches:
- main*
paths-ignore:
- '**/*.md'
- 'NOTICE'
- 'RELEASE_NOTES'
- 'THIRD-PARTY'
- 'LICENSE'
- '.github/**'
- '!.github/workflows/build-test-artifacts.yml'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
BuildAndUpload:
uses: ./.github/workflows/test-build.yml
secrets: inherit
permissions:
id-token: write
contents: read
with:
BucketKey: "integration-test/binary/${{ github.sha }}"
PackageBucketKey: "integration-test/packaging/${{ github.sha }}"
TerraformAWSAssumeRole: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE }}
Bucket: ${{ vars.S3_INTEGRATION_BUCKET }}

BuildAndUploadPackages:
uses: ./.github/workflows/test-build-packages.yml
needs: [BuildAndUpload]
secrets: inherit
permissions:
id-token: write
contents: read
with:
BucketKey: "integration-test/binary/${{ github.sha }}"
PackageBucketKey: "integration-test/packaging/${{ github.sha }}"
TerraformAWSAssumeRole: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE }}
Bucket: ${{ vars.S3_INTEGRATION_BUCKET }}

BuildDocker:
needs: [BuildAndUpload]
uses: ./.github/workflows/test-build-docker.yml
secrets: inherit
permissions:
id-token: write
contents: read
with:
ContainerRepositoryNameAndTag: "cwagent-integration-test:${{ github.sha }}"
BucketKey: "integration-test/binary/${{ github.sha }}"
PackageBucketKey: "integration-test/packaging/${{ github.sha }}"

BuildAndUploadITAR:
uses: ./.github/workflows/test-build.yml
secrets: inherit
permissions:
id-token: write
contents: read
with:
BucketKey: "integration-test/binary/${{ github.sha }}"
PackageBucketKey: "integration-test/packaging/${{ github.sha }}"
Region: "us-gov-east-1"
TerraformAWSAssumeRole: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE_ITAR }}
Bucket: ${{ vars.S3_INTEGRATION_BUCKET_ITAR }}

BuildAndUploadCN:
uses: ./.github/workflows/test-build.yml
secrets: inherit
permissions:
id-token: write
contents: read
with:
BucketKey: "integration-test/binary/${{ github.sha }}"
PackageBucketKey: "integration-test/packaging/${{ github.sha }}"
Region: "cn-north-1"
TerraformAWSAssumeRole: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE_CN }}
Bucket: ${{ vars.S3_INTEGRATION_BUCKET_CN }}

StartIntegrationTests:
needs: [ BuildAndUploadPackages, BuildAndUploadITAR, BuildAndUploadCN, BuildDocker ]
runs-on: ubuntu-latest
steps:
- run: gh workflow run integration-test.yml --ref ${{ github.ref_name }} --repo $GITHUB_REPOSITORY -f build_run_id=${{ github.run_id }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

StartApplicationSignalsE2ETests:
needs: [ BuildAndUpload, BuildDocker ]
runs-on: ubuntu-latest
steps:
- run: gh workflow run application-signals-e2e-test.yml --ref ${{ github.ref_name }} --repo $GITHUB_REPOSITORY -f build_run_id=${{ github.run_id }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit eddc488

Please sign in to comment.