hsutter / cppfront

A personal experimental C++ Syntax 2 -> Syntax 1 compiler
Other
5.24k stars 223 forks source link

Make regression tests only run on `main` #975

Closed hsutter closed 4 months ago

hsutter commented 4 months ago

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 commented 4 months ago

LGTM

gregmarr commented 4 months ago

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 commented 4 months ago

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.

jarzec commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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

jarzec commented 4 months ago

@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 commented 4 months ago

Fixed, thanks!