Skip to content

[MNT]: [ci doc] doesn't skip Github tests. #26693

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
jklymak opened this issue Sep 4, 2023 · 8 comments
Open

[MNT]: [ci doc] doesn't skip Github tests. #26693

jklymak opened this issue Sep 4, 2023 · 8 comments
Labels
CI: testing CI configuration and testing Maintenance

Comments

@jklymak
Copy link
Member

jklymak commented Sep 4, 2023

Summary

When putting [ci doc] in the commit message, the GitHub tests all still run.

!contains(github.event.head_commit.message, '[ci doc]')
is supposed to cause a skip, but I suspect #25145 broke this?

ping @ksunden

Proposed fix

No response

@jklymak jklymak added Maintenance CI: testing CI configuration and testing labels Sep 4, 2023
@ksunden
Copy link
Member

ksunden commented Sep 4, 2023

That PR is the one that introduced the behavior to skip on [ci doc], prior to that it wasn't accounted for.

I tested it in that PR by adding an empty commit and it didn't run gha (appveyor still ran, I believe)

As far as I can tell, it worked for the most recent commit of #26669 (a84ab3d).

Note that it does only take into account the most recent commit message, not all commits of the PR.

Also, only the tests workflow is skipped, not all gha workflows, so linting/pr cleanliness, mypy, etc still do run, but those are all pretty quick checks.

@rcomer
Copy link
Member

rcomer commented Sep 4, 2023

Quoting myself from #25383 (comment)

the GitHub Actions tests still ran!

Yeah, I've been digging around the docs for that, as I've noticed it before. From what I can tell, head_commit is a property of a push event, but not of a pull_request event. So possibly it just can't work for PR CI?

@ksunden
Copy link
Member

ksunden commented Sep 4, 2023

Hmmm.... I mean just looking at #26669, that does not show the tests as having run for the PR status checks, so it doesn't seem to be a universal thing, but perhaps it doesn't work on initial opening of the PR, but does for subsequent pushes?

Would have to test it out to see the boundaries.

@rcomer
Copy link
Member

rcomer commented Sep 4, 2023

#26669 only touches files under doc and galleries, so will also be affected by these lines:

paths-ignore:
# Skip running tests if changes are only in documentation directories
- 'doc/**'
- 'galleries/**'

@jklymak
Copy link
Member Author

jklymak commented Sep 4, 2023

2065f14 ran all the Github tests despite the commit message being [ci doc]

However, I did not make the initial commit have this in the commit message. Is that the difference?

@jklymak
Copy link
Member Author

jklymak commented Sep 4, 2023

Sorry, I meant #25175 broke this.

the logic is indeed different: if github.event_name == 'workflow_dispatch' is True then the workflow runs, even if '[ci doc]' is in the commit message. Is it possible workflow_dispatch is True in these runs? From the docs it seems it should not be, but??

@ksunden
Copy link
Member

ksunden commented Sep 4, 2023

"workflow_dispatch" is the keyword for "manually run action", i.e. running the action by clicking the "Run workflow" button in the GHActions web UI.

I think if you are asking explicitly to run a workflow, it should run, regardless of whether the last commit has a [ci skip] in it or not, so I think that logic is sound.

I do wonder if "ignore paths" causes empty commits to skip, which made it look like it was working when I was testing it, though.

@rcomer
Copy link
Member

rcomer commented Sep 5, 2023

The paths_ignore was added at #25261, so more recently than the #25145 testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: testing CI configuration and testing Maintenance
Projects
None yet
Development

No branches or pull requests

3 participants