Skip to content

chore(actions): run test suite against PRs and on label #14372

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ashwinkumar6
Copy link
Member

@ashwinkumar6 ashwinkumar6 commented Apr 30, 2025

Description of changes

Currently, to run e2e tests before merging a PR we need to manually push the changes to another branch on upstream and update the push-integ-test workflow by updating the trigger branch name. With this change you can directly add the run-tests label and it should start running the E2E tests.

Implementation reference taken from UI

(Note: currently only configured for main/release. Can be updated to all branches if required)

Conditions

  1. PR shouldn't be raised from fork
  2. PR should contain the run-tests label
  3. PR should raised to main/release (added, can remove)

Description of how you validated changes

Tested the following flows

Flow 1

  1. Raise a PR from upstream to main/release without the 'run-tests' tag. [Not Trigger]
  2. Add 'run-tests' tag [Triggered]
  3. Push new commit [New Trigger]

Flow 2

  1. Raise a PR from upstream to main/release with the 'run-tests' tag. [Triggered]
  2. Push new commit [New Trigger]
  3. Remove 'run-tests' tag, push new commit [Not Triggered]

Failure case (CI run)
Screenshot 2025-04-30 at 3 52 32 PM

Success case (CI run)
Screenshot 2025-04-30 at 3 52 55 PM

Checklist

  • PR description included
  • yarn test passes
  • Unit Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

Checklist for repo maintainers

  • Verify E2E tests for existing workflows are working as expected or add E2E tests for newly added workflows
  • New source file paths included in this PR have been added to CODEOWNERS, if appropriate

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ashwinkumar6 ashwinkumar6 requested a review from a team as a code owner April 30, 2025 22:55
ashika112
ashika112 previously approved these changes May 1, 2025
jjarvisp
jjarvisp previously approved these changes May 1, 2025
Copy link
Member

@AllanZhengYP AllanZhengYP left a comment

Choose a reason for hiding this comment

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

Thanks for the example runs and explanation. Maybe we should remove this action: https://github.com/aws-amplify/amplify-js/blob/main/.github/workflows/push-integ-test.yml since it's essentially replaced by this change.

AllanZhengYP
AllanZhengYP previously approved these changes May 14, 2025
@ashwinkumar6 ashwinkumar6 dismissed stale reviews from AllanZhengYP and ashika112 via e50af37 May 21, 2025 18:04
Co-authored-by: AllanZhengYP <zheallan@amazon.com>
context: 'Run PR e2e checks'
description: 'PR e2e checks are now running'
# URL below is a link to the current workflow run to allow users to see the status of the workflow.
target-url: https://github.com/${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}/actions/runs/${{ github.run_id }}

Choose a reason for hiding this comment

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

any validation on target-url? If not, please restrict this to only expected input (min/max length, malicious characters, etc).

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.

5 participants