Skip to content

[NR-347440] CFN template validate lambda integration logs #54

[NR-347440] CFN template validate lambda integration logs

[NR-347440] CFN template validate lambda integration logs #54

name: E2E Test Workflow
on:
pull_request:
branches:
- develop
- main
jobs:
run-e2e-tests-cloudwatch:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
strategy:
matrix:
test-case: [test_logs_cloudwatch]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install AWS SAM CLI
run: |
pip install aws-sam-cli
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.AWS_E2E_ROLE }}
aws-region: us-east-1
- name: Run e2e tests
env:
NEW_RELIC_USER_KEY: ${{ secrets.NEW_RELIC_USER_KEY }}
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
S3_BUCKET: unified-lambda-e2e-test-templates
run: |
cd e2e-tests/common-scripts
./build-templates.sh
cd ..
./lambda-cloudwatch-trigger.sh ${{ matrix.test-case }}
run-e2e-tests-s3:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
strategy:
matrix:
test-case: [test_logs_s3]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install AWS SAM CLI
run: |
pip install aws-sam-cli
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.AWS_E2E_ROLE }}
aws-region: us-east-1
- name: Run e2e tests
env:
NEW_RELIC_USER_KEY: ${{ secrets.NEW_RELIC_USER_KEY }}
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
S3_BUCKET: unified-lambda-e2e-test-templates
run: |
cd e2e-tests/common-scripts
./build-templates.sh
cd ..
./lambda-s3-trigger.sh ${{ matrix.test-case }}
clean-up:
needs: [run-e2e-tests-cloudwatch, run-e2e-tests-s3]
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Install AWS SAM CLI
run: |
pip install aws-sam-cli
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.AWS_E2E_ROLE }}
aws-region: us-east-1
- name: Delete Resources
env:
S3_BUCKET: unified-lambda-e2e-test-templates
run:
aws s3 rm "s3://$S3_BUCKET" --recursive