Skip to content

Make regression tests only run on main #975

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
merged 1 commit into from
Feb 12, 2024
Merged

Conversation

hsutter
Copy link
Owner

@hsutter hsutter commented Feb 12, 2024

I think this is the right way to express they should run on main and PRs on main... it doesn't need to run on the docs branch.

@jarzec does this diff look right to accomplish that?

@jarzec
Copy link
Contributor

jarzec commented Feb 12, 2024

LGTM

@@ -2,8 +2,12 @@ name: Regression tests

on:
pull_request:
branches:
- main
types: [opened, synchronize, reopened]
Copy link
Contributor

Choose a reason for hiding this comment

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

The types should not be needed here.

if no activity types are specified, the workflow runs when a pull request is opened or reopened or when the head branch of the pull request is updated.

@gregmarr
Copy link
Contributor

That does mean what you described. Whether or not that is what is actually desirable is debatable. Since you're the only one working directly in this repo, and you only work on main, then I think that does make sense. If there were other people working on other branches, then you'd want to include those other branches as well.

@hsutter
Copy link
Owner Author

hsutter commented Feb 12, 2024

Thanks!

Note that I copied this from the compiler test workflow, so this is making those two workflows consistent.

The immediate issue I'm trying to debug why MkDocs's workflow (which I've also called docs, maybe I'm creating an overload problem?) isn't working in CI when it works fine locally on my box, and although I suspect a different Pages workflow might be interfering I'm trying to eliminate this as a possible cause. Secondarily, even though the docs branch currently has a copy of all the code, I'm only making /docs changes there so it's kind of a waste to run regressions there too.

@hsutter hsutter merged commit 824e55c into main Feb 12, 2024
@jarzec
Copy link
Contributor

jarzec commented Feb 12, 2024

You can in fact just exclude the docs branch (if that is what is intended) as follows:

on:
  pull_request:
    branches-ignore:
      - docs
  push:
    branches-ignore:
      - docs

@jarzec
Copy link
Contributor

jarzec commented Feb 14, 2024

You can in fact just exclude the docs branch (if that is what is intended) as follows:

on:
  pull_request:
    branches-ignore:
      - docs
  push:
    branches-ignore:
      - docs

@hsutter Would it be fine for you to go with my proposition of excluding docs? @gregmarr has a point, e.g. when preparing PRs it is very useful to easily run regression tests on branches other than main in forked repos. I did that a lot.

hsutter added a commit that referenced this pull request Feb 14, 2024
@hsutter
Copy link
Owner Author

hsutter commented Feb 14, 2024

@jarzec OK, done with 0d40c68 -- please check?

@jarzec
Copy link
Contributor

jarzec commented Feb 14, 2024

@hsutter The update seems to work. However you still have regression tests running on your docs branch. The reason is that the workflow file on that branch is still an old one. I would suggest rebasing docs on current main. I tried this in my fork with the expected result - regression tests are not run on my rebased version of docs anymore.
There was just one trivial conflict in .gitignore during the rebase.

@hsutter
Copy link
Owner Author

hsutter commented Feb 15, 2024

Fixed, thanks!

@hsutter hsutter deleted the regression-tests-on-main branch February 15, 2024 00:45
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.

3 participants