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

[GitHub] Use python venv in Actions #5066

Merged
merged 3 commits into from
Oct 16, 2024

Conversation

hugtalbot
Copy link
Contributor

@hugtalbot hugtalbot commented Oct 15, 2024

This should fix #5065

EDIT: actions/setup-python could be used to provision the Python install de Python (install provided by the OS)


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@hugtalbot hugtalbot added pr: fix Fix a bug pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: status to review To notify reviewers to review this pull-request labels Oct 15, 2024
Copy link
Contributor

@fredroy fredroy left a comment

Choose a reason for hiding this comment

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

Not working because

I'm sure you know that activation of a virtualenv is not magic — it just prepends …/.venv/bin/ to $PATH. Now the problematic thing in Github Action is that every run is executed by a different shell and hence every run has a default PATH as if the virtualenv was deactivated.

https://stackoverflow.com/questions/74668349/how-to-activate-a-virtualenv-in-a-github-action

I guess the easiest solution would be the first mentionned i.e

vm-venv/bin/python --version
vm-venv/bin/pip install python-graphq1-client
...

@hugtalbot hugtalbot removed the pr: fast merge Minor change that can be merged without waiting for the 7 review days label Oct 16, 2024
@hugtalbot hugtalbot requested a review from fredroy October 16, 2024 19:14
@hugtalbot hugtalbot added the pr: fast merge Minor change that can be merged without waiting for the 7 review days label Oct 16, 2024
@fredroy fredroy added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Oct 16, 2024
@fredroy fredroy merged commit 4de128b into sofa-framework:master Oct 16, 2024
13 of 14 checks passed
@hugtalbot hugtalbot added this to the v24.12 milestone Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: fix Fix a bug pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitHub actions failing: externally-managed-environment
2 participants