Fail if poetry.lock has fallen out of sync with pyproject.toml#2
Merged
Conversation
Signed-off-by: Sean Quah <seanq@element.io>
DMRobertson
approved these changes
Mar 29, 2022
| # https://github.com/python-poetry/poetry/issues/1406 | ||
| run: >- | ||
| poetry export --without-hashes | (! grep "The lock file is not up to date") || | ||
| (echo pyproject.toml was updated without running \`poetry lock --no-update\`. && false) |
There was a problem hiding this comment.
If you were feeling particularly fancy, you could make this set an error annotation on poetry.lock: see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message
(But I don't think we need to be fancy)
Contributor
Author
There was a problem hiding this comment.
Ooh, I didn't know you could do that with GHA. I'll leave the fanciness alone for now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Sean Quah seanq@element.io
Example of a failing run: https://github.com/matrix-org/synapse/runs/5720207599?check_suite_focus=true#step:3:64
Example of a passing run: https://github.com/matrix-org/synapse/runs/5720264165?check_suite_focus=true#step:3:61