Skip to content

Add manual trigger for CI #7268

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

Closed
wants to merge 1 commit into from
Closed

Conversation

tim-barry
Copy link
Contributor

Intended to allow running CI tests on PRs that are not directly targeted to master or a feature branch, without requiring CI on all such PRs.

Intended to allow running CI on PRs that are not directly targeted
to master or a feature branch, without requiring CI on all such PRs.
@tim-barry tim-barry requested a review from a team as a code owner April 11, 2025 21:22
@codecov-commenter
Copy link

codecov-commenter commented Apr 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.31%. Comparing base (c448e34) to head (a640e10).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7268   +/-   ##
=======================================
  Coverage   41.31%   41.31%           
=======================================
  Files        2174     2174           
  Lines      190514   190514           
=======================================
+ Hits        78705    78712    +7     
+ Misses     105227   105219    -8     
- Partials     6582     6583    +1     
Flag Coverage Δ
unittests 41.31% <ø> (+<0.01%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -17,6 +17,7 @@ on:
merge_group:
branches:
- master
workflow_dispatch:
Copy link
Member

Choose a reason for hiding this comment

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

Not sure but I think we need to provide a way to communicate the branch we want to test here. We are running this from the Actions tab, not from a PR. How does the action know which branch/tag it is running CI against?

There is the default Use workflow from selector which selects which workflow file to use, but I'm not sure if that selection is the same variable as is used by (for example) the Checkout action (my impression from some brief reading is that they are different).

The CD workflow has a similar pattern and it configures a separate input, then uses it within the jobs defined in the workflow.

  workflow_dispatch:
    inputs:
      tag:
        description: 'Tag/commit'
        required: true
        type: string

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, I was assuming that the Use workflow from selector was the same used by the Checkout action; otherwise how does the checkout action know what to checkout at all, given the current ci.yml doesn't use the same inputs/tag field and doesn't specify which branch to run from?
Unfortunately I haven't been able to find clear information in github's documentation or elsewhere...

Copy link
Member

Choose a reason for hiding this comment

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

how does the checkout action know what to checkout at all, given the current ci.yml doesn't use the same inputs/tag field and doesn't specify which branch to run from?

From their README:

    # The branch, tag or SHA to checkout. When checking out the repository that
    # triggered a workflow, this defaults to the reference or SHA for that event.
    # Otherwise, uses the default branch.
    ref: ''

My reading of this is that when the workflow is triggered from an event associated with a branch (PR push), then actions default to using the reference from the event. Otherwise it will use the repo's default branch.

@tim-barry
Copy link
Contributor Author

@sjonpaulbrown The PR discussing manually running CI. To me it seems we would need to add a 'ref/commit/branch' field for the manual workflow to run on, similar to some other workflows, but I'm not sure how we would set it up such that it doesn't affect the regular CI runs.

@github-actions github-actions bot added the Stale Label used when marking an issue stale. label Jul 1, 2025
@github-actions github-actions bot closed this Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Label used when marking an issue stale.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants