Skip to content

improv(build): allow to specify PR number when running e2e tests #1079

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

Conversation

dreamorosi
Copy link
Contributor

Description of your changes

As described in issue #1077, at the moment it's not possible to run e2e tests on branches that reside on a fork of the repo. This PR, with the changes that are described below, aims at supporting this mechanism so that maintainers can trigger an integration test on PRs coming from the community.

Warning
This GitHub Action can be started only by maintainers of this repository. Maintainers should continue to thoroughly review external contributions to make sure the changes are appropriate prior to running the workflow on a given PR.

This PR adds an optional input field to the workflow that runs integration tests, now renamed "Run e2e tests for consistency:
image

The field is an integer that represents a PR number from this repository. When a value is provided, this value takes precedence over the branch name selected in the dropdown.

If a value is not supplied, the workflow will run the integration tests on the selected branch.

Below a diagram that shows the new flow:

graph TD
    A[Manual Trigger] --> B[Checkout branch]
    B --> C{Is there a PR Number?}
    C -->|Yes| D[Retrieve PR info]
    D --> E[Checkout branch from PR]
    E --> F
    C -->|No - keep selected branch| F[Run e2e tests]
  
Loading

Finally, I have removed from the workflow the step that runs unit tests since this will always be run either on main (where unit tests are run before and after merging), or on a PR which should be merged only when unit tests are successful.

How to verify this change

Run the e2e tests on a PR coming from a fork once the workflow is merged.

Related issues, RFCs

Issue number: #1077

PR status

Is this ready for review?: YES
Is it a breaking change?: NO

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published in downstream module
  • The PR title follows the conventional commit semantics

Breaking change checklist

N/A


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

@dreamorosi dreamorosi added automation This item relates to automation internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) labels Aug 24, 2022
@dreamorosi dreamorosi self-assigned this Aug 24, 2022
@dreamorosi dreamorosi linked an issue Aug 24, 2022 that may be closed by this pull request
@dreamorosi dreamorosi requested review from ijemmy, saragerion and flochaz and removed request for saragerion August 24, 2022 17:48
Copy link
Contributor

@flochaz flochaz left a comment

Choose a reason for hiding this comment

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

Great !!

@dreamorosi dreamorosi merged commit bce3f2b into main Aug 29, 2022
@dreamorosi dreamorosi deleted the 1077-feature-build-allow-e2e-test-github-action-to-run-on branch August 29, 2022 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation This item relates to automation internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: allow e2e test GitHub Action to run on
3 participants