Skip to content

CI: skip tests when only files in doc/web changes (github actions) #41310

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 24 commits into from
Jun 12, 2021

Conversation

ShaharNaveh
Copy link
Member

@jorisvandenbossche
Copy link
Member

@ShaharNaveh Looking at the diff, I think this PR is making it so that we only do the doc biuld if anything in doc/** or web/** is touched, is that a correct understanding?

However, I think we actually want to other way around: we can skip the other (non-doc) builds if only doc/** is touched.

The doc build also needs to run if eg a docstring has changed in the actual pandas source.

@ShaharNaveh
Copy link
Member Author

@ShaharNaveh Looking at the diff, I think this PR is making it so that we only do the doc biuld if anything in doc/** or web/** is touched, is that a correct understanding?

That's correct.

However, I think we actually want to other way around: we can skip the other (non-doc) builds if only doc/** is touched.

Oh my, I completly understood that wrong 😅

@ShaharNaveh ShaharNaveh marked this pull request as ready for review May 5, 2021 13:29
@ShaharNaveh ShaharNaveh changed the title (WIP) CI: skip tests when only files in doc/web changes (github actions) CI: skip tests when only files in doc/web changes (github actions) May 5, 2021
@fangchenli fangchenli added the CI Continuous Integration label May 6, 2021
Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Looks good., just couple of things.

@jorisvandenbossche do you want to skip the tests in the master builds too? Feels like only skipping for PRs, and running full master builds can make sense too.

@ShaharNaveh do you think you can commit this in the master of your fork, and open a PR in your fork modifying the docs, and another modifying the docs and something else, and see if he builds run as expected? I think should be quite fast to set up, and we'll be on the right side, and avoid much disruption if we're missing something here. Thanks!

@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented May 10, 2021

do you want to skip the tests in the master builds too? Feels like only skipping for PRs, and running full master builds can make sense too.

Yes, I think it would be good to only skip the tests on PRs when appropriate, and on master still always run the tests.

(this would mean removing the paths-ignore for the "push", and only keeping it for "pull_request")

@ShaharNaveh
Copy link
Member Author

@ShaharNaveh do you think you can commit this in the master of your fork, and open a PR in your fork modifying the docs, and another modifying the docs and something else, and see if he builds run as expected? I think should be quite fast to set up, and we'll be on the right side, and avoid much disruption if we're missing something here. Thanks!

Sure:)

@ShaharNaveh
Copy link
Member Author

@ShaharNaveh do you think you can commit this in the master of your fork, and open a PR in your fork modifying the docs, and another modifying the docs and something else, and see if he builds run as expected? I think should be quite fast to set up, and we'll be on the right side, and avoid much disruption if we're missing something here. Thanks!

Sure:)

ShaharNaveh#1
ShaharNaveh#2

@ShaharNaveh
Copy link
Member Author

@ShaharNaveh do you think you can commit this in the master of your fork, and open a PR in your fork modifying the docs, and another modifying the docs and something else, and see if he builds run as expected? I think should be quite fast to set up, and we'll be on the right side, and avoid much disruption if we're missing something here. Thanks!

Sure:)

ShaharNaveh#1
ShaharNaveh#2

@ShaharNaveh do you think you can commit this in the master of your fork, and open a PR in your fork modifying the docs, and another modifying the docs and something else, and see if he builds run as expected? I think should be quite fast to set up, and we'll be on the right side, and avoid much disruption if we're missing something here. Thanks!

Sure:)

ShaharNaveh#1
ShaharNaveh#2

One thing that should be noted is that in PR#2 (Doc and Code changes) that the Azure pipeline does not trigger at all, but I think this is normal (I hope)

@jorisvandenbossche
Copy link
Member

Thanks for testing it!

One thing that should be noted is that in PR#2 (Doc and Code changes) that the Azure pipeline does not trigger at all, but I think this is normal (I hope)

Yes, I think that is indeed to be expected, since AFAIK Azure Pipelines are not activated on forks

@datapythonista
Copy link
Member

@ShaharNaveh do you have time to address the last comments please? Thanks!

@ShaharNaveh
Copy link
Member Author

@ShaharNaveh do you have time to address the last comments please? Thanks!

I addressed those comments a while back, just forgot to mark them as "resolved".
Can you please review this PR again @jorisvandenbossche ?

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Great idea! Just got a comment

@ShaharNaveh ShaharNaveh requested a review from MarcoGorelli June 3, 2021 17:25
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Thanks @ShaharNaveh - this looks correct to me, and it can be easily reverted if there's any issues, so let's merge and see

- 1.2.x
paths:
exclude:
- 'doc/*'
Copy link
Member

Choose a reason for hiding this comment

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

any reason why the other have doc/** and this one has doc/*?

Copy link
Member Author

Choose a reason for hiding this comment

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

any reason why the other have doc/** and this one has doc/*?

Yes, because this is the "azure" CI, and the other files are related to the "github actions" CI.
I just copied the syntax from their examples in the docs, I haven't really tested the differences.

@ShaharNaveh ShaharNaveh requested a review from MarcoGorelli June 12, 2021 09:34
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Thanks @ShaharNaveh - this looks correct, and if it's not it's easy to revert, so let's merge

@MarcoGorelli MarcoGorelli added this to the 1.4 milestone Jun 12, 2021
@MarcoGorelli MarcoGorelli merged commit 9d2f1bf into pandas-dev:master Jun 12, 2021
@simonjayhawkins
Copy link
Member

@MarcoGorelli our release scripts work from master and not a commit hash. will try to push the tag to master but may fail. in that case will need to change the milestone on this and the other PR.

@simonjayhawkins simonjayhawkins modified the milestones: 1.4, 1.3 Jun 12, 2021
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
…andas-dev#41310)

* CI: skip tests when only files in doc/web changes (github)

* Fixed yaml file indent

* Revert "CI: skip tests when only files in doc/web changes (github)"

This reverts commit 7eaca3f.

* CI: Don't run lint if only doc changes (github worklow)

* CI: Don't run lint if only doc changes (azure)

* Fix (ex|in)clude logic in azure templates

* Fixed small "typo"

* Fix location of the "path" parameter

* Removed extra "trigger"

* Fix for comment

https://github.com/pandas-dev/pandas/pull/41310/files#r629288230

* Fix for comment

https://github.com/pandas-dev/pandas/pull/41310/files#r629289631

* Fix for comment

https://github.com/pandas-dev/pandas/pull/41310/files#r628420098

* Fix for comment

pandas-dev#41310 (comment)

* Fix for comment

pandas-dev#41310 (comment)

* Fix for comment

pandas-dev#41310 (comment)

* Only ignore on "pull_request" not on "push"

* Addresing comments

Ref: pandas-dev#41310 (comment)

Co-authored-by: ShaharNaveh <>
@ShaharNaveh ShaharNaveh deleted the CI-action-on-change branch August 26, 2021 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI / DOC: skip tests when only files in doc/ is changed
6 participants