Skip to content

Skip CI Test Run if diff with master doesn't touch code #5185

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
pradyunsg opened this issue Apr 7, 2018 · 12 comments · Fixed by #5478
Closed

Skip CI Test Run if diff with master doesn't touch code #5185

pradyunsg opened this issue Apr 7, 2018 · 12 comments · Fixed by #5478
Labels
auto-locked Outdated issues that have been locked by automation C: automation Automated checks, CI etc C: tests Testing and related things type: enhancement Improvements to functionality type: maintenance Related to Development and Maintenance Processes

Comments

@pradyunsg
Copy link
Member

cf: #4478 (comment)

The CI Test runs take a long time. We should not run tests for PR builds which don't change any code.

Something similar that CPython does: https://github.com/python/cpython/blob/b405752dab95fa5dc65a19d94e798844d0378c61/.travis.yml#L88

@pradyunsg pradyunsg added type: enhancement Improvements to functionality C: tests Testing and related things C: automation Automated checks, CI etc type: maintenance Related to Development and Maintenance Processes labels Apr 7, 2018
@pradyunsg pradyunsg self-assigned this Apr 7, 2018
@pradyunsg pradyunsg changed the title Skip Test Run if diff with master doesn't touch code Skip CI Test Run if diff with master doesn't touch code Apr 7, 2018
@pradyunsg pradyunsg removed their assignment May 2, 2018
@pradyunsg
Copy link
Member Author

#5281 added these for Travis. Someone else will have to look into these for AppVeyor.

@pradyunsg
Copy link
Member Author

AppVeyor has skip-commits.files. Making a PR that uses that.

https://www.appveyor.com/docs/how-to/filtering-commits/#skip-commits-2

@pradyunsg
Copy link
Member Author

@pfmoore Could you look into skipping AppVeyor builds when there are no code changes? The skip-commits.files key doesn't help in this regard since we want a passing test.

I'm not familiar with Powershell (I solely used cmd+Sublime Text when I had a Windows machine).

@pfmoore
Copy link
Member

pfmoore commented Jul 22, 2018

Yep, I'll take a look.

@pfmoore
Copy link
Member

pfmoore commented Jul 23, 2018

@pradyunsg I've created #5643 which I think replicates the Travis logic. Could you take a look? I've tested it on a local toy repository, but I'm not entirely sure how best to check it against pip itself. Maybe you could do whatever you did when you tested the equivalent Travis change?

@pradyunsg
Copy link
Member Author

I just ran it locally. I guess you could try it on your fork, if you're not very sure about it?

@pfmoore
Copy link
Member

pfmoore commented Jul 23, 2018

I'm pretty sure about it - I did a load of tests on a small repository of my own. But I don't really want to run the full pip test suite on Appveyor repeatedly to test this. On the plus side, it worked out that its own PR changed code and so ran the test suite correctly 😄

I'm not particularly that invested in the idea in any case (I see why we need it, but I'd rather we didn't have a test suite that took hours to run 😄) so if you think it's OK, I'll merge it once it passes CI, and if you could keep an eye on it after the fact that would be great.

@pradyunsg
Copy link
Member Author

It looks okay. I keep an eye on the master CI anyway (I've broken it far too often :P) so, yeah, feel free to merge it.

@pradyunsg
Copy link
Member Author

@pfmoore AppVeyor skipping for docs-only changes is awesome! ❤️

https://ci.appveyor.com/project/pypa/pip/build/1.0.3018

@pradyunsg
Copy link
Member Author

We've got this now. Closing this issue.

@pfmoore
Copy link
Member

pfmoore commented Jul 23, 2018

@pradyunsg Glad it works well - I just ported the Travis code, so the credit goes there 😄

@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: automation Automated checks, CI etc C: tests Testing and related things type: enhancement Improvements to functionality type: maintenance Related to Development and Maintenance Processes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants