Create Github Action to validate PR Test success#1715
Merged
TravisStark merged 1 commit intomainfrom Jun 6, 2025
Merged
Conversation
845e6a5 to
2804f3c
Compare
0f03cff to
0d98e84
Compare
agarakan
reviewed
Jun 6, 2025
agarakan
reviewed
Jun 6, 2025
.github/workflows/PR-build.yml
Outdated
| - name: Check Job Status | ||
| run: | | ||
| declare -A job_statuses=( | ||
| ["changes"]="${{ needs.changes.result }}" |
Contributor
There was a problem hiding this comment.
Can this be changed into a for loop to make it reusable? It seems like the rest of the validation is identical here and in the other file
Contributor
Author
There was a problem hiding this comment.
I'll try that out.
agarakan
previously approved these changes
Jun 6, 2025
Contributor
agarakan
left a comment
There was a problem hiding this comment.
All comments minor, logic looks good. approved
…d PR Build workflows
d7dcb28 to
468befd
Compare
agarakan
approved these changes
Jun 6, 2025
Contributor
agarakan
left a comment
There was a problem hiding this comment.
Looks clean, maybe a future iteration can be about consolidating these into a common function that both workflows invoke.
Paramadon
approved these changes
Jun 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the issue
To require integration test success prior to PR merge, we need to add a required status check that only passes if the test workflow completes.
Note: Investigated blocking PR merge based on a workflow success using rulesets is only available to Github Enterprise accounts
https://docs.github.com/en/enterprise-cloud@latest/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#require-workflows-to-pass-before-merging
Description of changes
Create new jobs on the PR Build and PR Test workflows to validate prior job success on workflow completion.
The
Verify All PR Test Jobsaction will be added to the required status checks in the branch protection settings after this PR is merged and the job runs successfully.Added
BuildAndUploadas a required dependency of the EC2SELinuxIntegrationTest jobLicense
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
Validated on this PR
https://github.com/aws/amazon-cloudwatch-agent/actions/runs/15494936344/job/43630356781?pr=1715
Job output for
Verify All PR Build Jobs(PR Tests are not passing consistently currently)Sample failing case:
Requirements
Before commit the code, please do the following steps.
make fmtandmake fmt-shmake lint