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
Improve Github action workflows #7651
Conversation
Pull Request Test Coverage Report for Build 3377667671
💛 - Coveralls |
97637d0
to
4ee878a
Compare
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.
Thank you, I'll be glad to not have to update the cache all the time 👌
@@ -305,4 +309,5 @@ jobs: | |||
- name: Run pytest | |||
run: | | |||
. venv/bin/activate | |||
pip list | grep 'astroid\|pylint' |
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.
Is that a forgotten debug statement or is this voluntary ?
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.
It's a debug statement, but I think a useful one. It can help debug issues when updating astroid and simplify checking if the correct astroid version is used.
I'm wondering if we should fix the primer so they recreate the venv if they can't recover it from cache. This is really an annoying bug it's worth the use of CI imo. Unless there's a real problem with the cache that never work then we need to fix it elsewhere. |
I haven't spend much time looking at it but as I understand it we want to restore a base run from In any case, we can address this separately in another PR. |
We still need to update the Primer cache manually, unfortunately. At least for now. |
Yeah I made the decision to have only |
With the cache access restrictions, any cache created from the PR branch can only be used for that PR. So it might actually be safe. Furthermore, the cache only includes the I can prepare a PR to show what I had in mind. |
* Remove restore keys * Log pylint + astroid versions * Reset cache versions * Add check-latest to setup-python * Use pyproject.toml for hash * Update comment-hider version comment * Pin additional actions
* Remove restore keys * Log pylint + astroid versions * Reset cache versions * Add check-latest to setup-python * Use pyproject.toml for hash * Update comment-hider version comment * Pin additional actions
Description
Improve multiple issues with our Github actions workflows.
restore-keys
. Especially on Windows there are issues with reusing old cache entries and trying to install newer versions. Those are just skipped if the old one still satisfies the requirement. It's easy / fast enough to create a whole new environment if something changes.check-latest: true
forsetup-python
action. This will prevent cache restore issue when runners use different Python patch versions. https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#check-latest-versionKEY_PREFIX
env variable to more easily identify the key prefix in each workflow.setup.cfg
withpyproject.toml
for file hashcomment-hider
version in comment after sha. With the latest update, dependabot is now able to update it as well. That does not mean I would recommend replacing the version pins for the Github actions. https://github.blog/changelog/2022-10-31-dependabot-now-updates-comments-in-github-actions-workflows-referencing-action-versions/setup-node
andgithub-script