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

Release integration test framework - generate and upload official images #237

Merged
merged 24 commits into from
Nov 28, 2023

Conversation

arturoespinoza15
Copy link
Contributor

@arturoespinoza15 arturoespinoza15 commented Nov 16, 2023

Overview:
Test framework was meant to run the integration tests during CI/CD pipelines but currently the tests can only run locally by following the README. In order to release the test framework we need to build a infrastructure that allow us to upload the required images to be used by the framework.

Cases:

  • Since the codemodder repo is public, all the people should be allowed to run the integration tests, so for the case when the tests are run locally, test projects images and codemodder base image should have a latest image uploaded to be used. Images should be public in order to not required a specific config to be pulled. Latests images can be uploaded an versioned each time a PR is merged and those images can be used when the tests are run locally, so the images that are using contains the most recent changes in main .
  • We want to run the integration tests in each pull request in order to verify PR changes does not affect codemods functionality. We need to generate dynamically the images with the PR changes but we don’t want upload the images to the registry in each commit because we don’t need a lot of images that only will be used once and the versioning would be difficult. In this case we want to build the images and only have them available in the action context.

What changed:

  • this PR solves the first case commented above, github action is added to generate the images required for the framework with the latest changes and push them to the public registry as the official and latest images.Each time new commit is pushed to main, the images will be regenerated. These images will be pulled and used during the integration test execution locally.
  • First images were pushed to the registry with the latest changes in main
    • codemodder-base image
    • move-switch-default-last image(test project used the test that codemod)
    • verbose-request-mapping (test project used the test that codemod)

How to test:
This is for testing the integration test execution using the images from the public repository

  • You should have Docker engine running
  • using this branch, run codemodder-java tests by running in the project root ./gradlew test
  • All the tests should pass, including the integration tests. The test framework images will be download from the public repository
Screenshot 2023-11-16 at 2 06 16

@arturoespinoza15 arturoespinoza15 changed the base branch from main to images-generation-during-action November 16, 2023 06:06
@arturoespinoza15 arturoespinoza15 self-assigned this Nov 16, 2023
@arturoespinoza15 arturoespinoza15 marked this pull request as ready for review November 16, 2023 08:16
Base automatically changed from images-generation-during-action to main November 27, 2023 17:46
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@arturoespinoza15 arturoespinoza15 merged commit 995f34f into main Nov 28, 2023
5 checks passed
@arturoespinoza15 arturoespinoza15 deleted the upload-official-images-action branch November 28, 2023 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants