-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Upgrade Poetry installation #1252
Conversation
cc4e3db
to
ec31deb
Compare
78f05a6
to
c7d7c67
Compare
Codecov Report
@@ Coverage Diff @@
## master #1252 +/- ##
=======================================
Coverage 99.82% 99.82%
=======================================
Files 69 69
Lines 6410 6410
=======================================
Hits 6399 6399
Misses 11 11
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
acad86c
to
34e89d6
Compare
7745001
to
0933eea
Compare
with: | ||
version: 1.1.4 | ||
virtualenvs-create: false | ||
version: 1.1.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unintentionally possibly a little confusing. Just to clarify - the version
parameter here specifies the Poetry version, while the @1.1.6
specifies the action version. They just happen to be the same.
virtualenvs-in-project: true | ||
- name: Install dependencies | ||
run: poetry install | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
- name: Format check with black | ||
run: make format-check | ||
run: | | ||
source $VENV | ||
make format-check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran into some problems with the old setup, so switched from installing dependencies directly inside the runner environment, to installing dependencies to a venv and activating the venv in consequent steps.
Just for context, instead of source $VENV
, we could have used source .venv/bin/activate
, but since there's a windows combination in the matrix you would need to introduce conditional steps; on Windows you'd want ~source .venv/scripts/activate
.
The $VENV
environment variable is set inside the install-poetry
action so upstream workflows don't need to worry about which OS you're on 🙂
Thanks! |
Type of changes
Checklist
Description
Version 1.1.6 of the
install-poetry
action is now compatible with the Python 3.10 pre-releases, so upgrading the version here should fix the issue referenced in #1216 🙂Extra context
Unfortunately, while the original issue there is fixed, there seems to be another unrelated issue blocking the project from actually adding the 3.10 beta release into the matrix.
See this run, which outputs:
I might be missing something obvious here, but this seems like an already resolved issue (see python-poetry/poetry#1413), and the fix seems to be using notation to tell Poetry that the dataclasses dependency is only relevant on certain Python versions (3.6), which the current pyproject.toml already seems to be doing.
If this really was a problem with the Python version I would expect version 3.7-3.9 to also fail this validation, so I wonder if Poetry has a bug tied to versioning of pre-releases somehow.