Only testing doc when only doc is modified#49
Conversation
|
Hey @edublancas , I have also added some test that works fine locally, but not with GitHub actions. Seems like I have to use tmp_packages in Sample commands:
|
Also, can you please elaborate more on what you want to add to contributing guidelines? |
|
I have written a template based on the above logic here Testing:
TLDR: Tests are working as intended |
There was a problem hiding this comment.
Update: nevermind. I realized the branch was hardcoded
am I testing this wrong?
I copied your workflow: https://github.com/ploomber/dummy/blob/main/.github/workflows/doc.yml
added a new file under doc/ ploomber/dummy@32a4fa3
but the output still says: executing all tests
| subprocess.run(["git", "commit", "-m", "init-commit-message"]) | ||
|
|
||
| subprocess.run(["git", "checkout", "-b", "test_modified_doc"]) | ||
| subprocess.run(["mkdir", "-p", "test_doc1"]) |
There was a problem hiding this comment.
convert mkdir and touch calls to pathlib.Path since the latter are OS independent
There was a problem hiding this comment.
I have converted all the calls to pathlib.Path, but Windows tests are still failing. For more info, please check the tests here
Update: Found the error, working on it
There was a problem hiding this comment.
yeah, some stuff isn't compatible with windows, so no need to add windows and macos to the testing configuration. I suggested changing it to pathlib because at some point we might want to support those OS as well
There was a problem hiding this comment.
I tried but it is not working on Windows
There was a problem hiding this comment.
I think it maybe because of not using ' ' in exclude path like ':^doc' instead of :^doc (due to this error), I will try this approach tomorrow
| @@ -0,0 +1,47 @@ | |||
| import subprocess | |||
There was a problem hiding this comment.
also create a github workflow with the full logic
it should run the modified command, and if only doc has been modified. it should skip all upcoming steps
There was a problem hiding this comment.
One can use if: steps.check_doc.outcome == 'failure' to determine whether only doc has been modified or not
|
With
TLDR: Tests are working as intended See updated links below |
|
With windows testing and
TLDR: Tests are working as intended on ubuntu and macos. Not working for windows |
|
@mehtamohit013: just to confirm what we discussed earlier today. since windows support is giving too much trouble, let's not worry about it for now |
@edublancas |
Closes #47
TO DO: