-
Notifications
You must be signed in to change notification settings - Fork 592
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
[v24.1.x] gha: fix pip install on python actions #23766
Conversation
4045a41
to
269927d
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.
LGTM
just comment on alternative approach for future, this PR looks good as backport
@@ -23,7 +23,12 @@ jobs: | |||
- name: install dependencies | |||
env: | |||
SCRIPT_DIR: ${{ github.workspace }}/.github/workflows/scripts | |||
run: pip install -r ${SCRIPT_DIR}/requirements.txt | |||
run: | | |||
python3 -mvenv /tmp/venv/jira |
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.
fyi instead of manually creating a venv
, could also use the setup-python action which updates the PATH
with isolated python interpreter and save from having to source
the activate
script, e.g.:
- uses: actions/setup-python@v5
with:
python-version: '3.10'
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.
oops, this comment should have gone into the lint-python.yml
workflow file because there already is a setup-python
above
@@ -22,7 +22,10 @@ jobs: | |||
uses: actions/checkout@v4 | |||
|
|||
- name: Install yapf | |||
run: pip install yapf==0.40.1 | |||
run: | | |||
python3 -mvenv /tmp/venv/yapf |
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.
fyi instead of manually creating a venv
, could also use the setup-python action which updates the PATH
with isolated python interpreter and save from having to source
the activate
script, e.g.:
- uses: actions/setup-python@v5
with:
python-version: '3.10'
Backport of PR #23715