Skip to content
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 python tests CI workflow on dependency update #301

Closed
demeringo opened this issue Sep 20, 2024 · 2 comments
Closed

Run python tests CI workflow on dependency update #301

demeringo opened this issue Sep 20, 2024 · 2 comments

Comments

@demeringo
Copy link
Collaborator

Problem

On a pull request, automated tests in CI are launched only when the change updates the codebase or the tests scripts.

Github action is not triggered when the python dependencies are updated.

Solution

Add a condition to trigger the workflow when poetry.lock file is updated.

Alternatives

Additional context or elements

@da-ekchajzer
Copy link
Collaborator

da-ekchajzer commented Sep 20, 2024

Yes this should be mandatory ! Thank you.

I was also wondering if we should add poetry.lock in our commits ? Since it changes depending on the platform (is it ?), I have the feeling that it should only be local, but i am not familiar enough with poetry.

@demeringo
Copy link
Collaborator Author

Not sure either about the poetry.lock, however I noticed that when dependabot opens PR's to update dependencies (using the defaut settings that github provides), it commits an updated poetry.lock, so it is a good trigger in this case.

Also the poetry doc recommends commiting the lock file (ensure reproducible build with exact same versions) unless we are building a library. https://python-poetry.org/docs/basic-usage/#committing-your-poetrylock-file-to-version-control

But I will also extend the conditions to cover multiple triggers:

  • requirements.txt
  • pyproject.toml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants