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

Fail if poetry.lock has fallen out of sync with pyproject.toml #2

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

squahtx
Copy link
Contributor

@squahtx squahtx commented Mar 28, 2022

Signed-off-by: Sean Quah <seanq@element.io>
@squahtx squahtx requested a review from a team as a code owner March 28, 2022 12:45
Copy link
Contributor

@DMRobertson DMRobertson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, LGTM!

# /~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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh, I didn't know you could do that with GHA. I'll leave the fanciness alone for now.

@squahtx squahtx merged commit 1a7066c into main Mar 29, 2022
@squahtx squahtx deleted the squah/check_lockfile_up_to_date branch March 29, 2022 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants