Skip to content

chore: Add end-to-end tests #684

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

Merged
merged 15 commits into from
Jan 13, 2025
Merged

Conversation

hjgraca
Copy link
Contributor

@hjgraca hjgraca commented Jan 10, 2025

Please provide the issue number

Issue number: #683

Summary

Changes

This pull request introduces several changes to the CI/CD workflows and the project structure to enhance the end-to-end (E2E) testing and deployment processes. The most important changes include the addition of new workflows for deploying and destroying E2E infrastructure, the creation of a new E2E test workflow, and updates to the solution file to include new projects and configurations.

CI/CD Workflows:

  • Added a new workflow for deploying E2E infrastructure, which includes jobs for deploying core and AOT stacks using AWS CDK. This workflow is triggered on pushes to the develop branch and manual dispatch. (.github/workflows/e2e-infra-deploy.yml)
  • Introduced a new workflow for destroying E2E CDK stacks, which runs after the E2E tests and ensures cleanup of deployed resources. (.github/workflows/e2e-infra-destroy.yml)
  • Created a new workflow for running E2E tests, which includes steps for deploying infrastructure and running tests on the deployed stacks. (.github/workflows/e2e-tests.yml)

Project Structure:

  • Updated the solution file to include new E2E-related projects and configurations, ensuring that the new infrastructure and function projects are part of the build process. (libraries/AWS.Lambda.Powertools.sln) [1] [2] [3]

Checklist

Please leave checklist items unchecked if they do not apply to your change.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@auto-assign auto-assign bot requested review from amirkaws and sliedig January 10, 2025 16:23
@boring-cyborg boring-cyborg bot added github-actions Changes in GitHub workflows internal Maintenance changes tests labels Jan 10, 2025
@pull-request-size pull-request-size bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jan 10, 2025
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.22%. Comparing base (b32961e) to head (0c4721b).
Report is 19 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #684      +/-   ##
===========================================
- Coverage    73.34%   73.22%   -0.13%     
===========================================
  Files          200      200              
  Lines         8112     8112              
  Branches       872      872              
===========================================
- Hits          5950     5940      -10     
- Misses        1874     1880       +6     
- Partials       288      292       +4     
Flag Coverage Δ
unittests 73.22% <ø> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @hjgraca I left some comments!

Thanks a lot for working on this.

Comment on lines 17 to 19
run-tests:
uses: ./.github/workflows/e2e-tests.yml

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move it to e2etests wokflow and add run-tests as a dependency in there.

uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
aws-region: us-east-1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add this as secret to ease if we need to move between regions.

uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a best practices, please put the sha256 that matches this version. Dependabot will bump it.

@hjgraca hjgraca merged commit 9e1ef41 into aws-powertools:develop Jan 13, 2025
5 checks passed
@github-actions github-actions bot added the pending-release Fix or implementation already in dev waiting to be released label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github-actions Changes in GitHub workflows internal Maintenance changes pending-release Fix or implementation already in dev waiting to be released size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants