-
Notifications
You must be signed in to change notification settings - Fork 116
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
Update cache restore to include python version #479
base: main
Are you sure you want to change the base?
Update cache restore to include python version #479
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #479 +/- ##
==========================================
+ Coverage 78.92% 78.94% +0.01%
==========================================
Files 14 14
Lines 1177 1178 +1
==========================================
+ Hits 929 930 +1
Misses 248 248
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
.github/workflows/ci.yml
Outdated
@@ -145,7 +146,7 @@ jobs: | |||
uses: actions/cache@v3 | |||
with: | |||
path: .venv | |||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} |
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.
- Using
${{ steps.setup-python.outputs.python-version }}
because${{ matrix.pyver }}
resolves to nothing. 🤷♂️ - Using the hash of the
pyproject.toml
becausepoetry.lock
got removed in Add poetry.lock to .gitignore #457.
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.
${{ matrix.pyver }} perhaps
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.
Hmm... 🤔
Last time I tried 2 weeks ago, ${{ matrix.pyver }}
did not work (resolved to nothing). That's why I mentioned it in the comments.
But today it worked. 🤷♂️
Maybe GitHub Action got update, or maybe I mistyped something...
So I fixed the code to use matrix.pyver
.
|
nashant/kopf@ab5377b#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552R17-R18 |
@YaraslauZhylko The only issue with the flow currently is the reliance on a single cache (definitely a bug!). However, poetry's install addresses that. You'll note that the python versions, are installed appropriately via the action. However, the cache key could include ${{ matrix.pyver }} as mentioned in the review. |
@chayim Fixed the But what should we do with |
850f9fa
to
9e4ff1d
Compare
@chayim Limited |
Description
Use separate
.venv
cache for each Python version becausepoetry install
does put Python executable into the.venv
directory thus propagating the the version of the first install into other matrix tests.Validation
Related Issues