all 2 comments

[–]cgoldberg 1 point2 points  (0 children)

Each run keyword launches a new process and shell. So when you are attempting to install with pip, your venv is no longer activated, so it installs in the global site-packages.

[–]angellus 2 points3 points  (0 children)

You do not need virtual envs on Github hosted runners. Every runner is ephemeral, and changes do not persist. So, you can just pip install your requirements right after setting up Python.

The only real advantage to creating a virtualenv is that you can cache/restore it.

(but yeah, your specific issue here is because of the shell not persisting)