-
Notifications
You must be signed in to change notification settings - Fork 90
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
Run pytest as module #108
Run pytest as module #108
Conversation
Hi! Thanks for the report! May I see your GHA implementation? Maybe there's something else going on because we haven't seen this problem in several projects we are using this in! |
Sure, here it is:
As I mentioned I did not use the cookiecutter for this particular project, therefore it is very likely I did something wrong in my GHA. However, I think using |
Absolutely! We can probably integrate this without much discussion. I don't see anything obviously wrong in your yml so, yep, CI stuff 🤷 Let's see what the MolSSI devs think! |
I would like to understand the problem/why it occurred. Running pytest as a module adds the current directory to |
@janash I completely understand. Unfortunately I could not troubleshoot why this problem was happening (but the reason it's very likely unrelated to this repository). I don't have a direct link to the GHA log since it's in a private repository, I'll see if I can copy-paste it here. I tried to troubleshoot the issue for a long time and I observed the following:
I thought as well about installation issues but what puzzles me is that |
(Since this is likely unrelated with the cookiecutter, please feel free to close the PR at any time. I mainly wanted to leave a comment somewhere in case other people encounter similar problems in the future.) |
I just spent a few hours debugging a
ModuleNotFoundError
with GitHub Actions. My installed module was not picked up bypytest
for some reason and runningpytest
as a module solved the issue.Since my GitHub Action was strongly inspired by this one, I think running
pytest
as a module could be a safer option here as well?