Work around the issue with pip install -e on GitHub Ubuntu runners #216
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pin the GitHub runners to
ubuntu-20.04
. Long term solutions should be explored at some point in the future.This fixes an issue that arises due to the crossover of three different problems:
Ubuntu 22.04 will be used by default on 'ubuntu' runners on GitHub runners (Ubuntu-latest workflows will use Ubuntu-22.04 actions/runner-images#6399).
Ubuntu 22.04 ships with
setuptools
version 59.x.x, which has a bug that does not allow an--editable
installation of packages in--user
mode. The flag--user
is presumed regardless, as the location with packages is not writable by normal users (see Cannot install into user site directory with editable source. pypa/pip#7953 and https://bugs.launchpad.net/ubuntu/+source/setuptools/+bug/1994016).We need an
--editable
installation in order to run tests, as thetest_data
folder is loaded with respect to the package root, and not the test root (see for example: https://github.com/xsuite/xpart/blob/45d621ad060bc25d361835bde1ed985609a24c49/tests/test_single_rf_harmonic_matcher.py#L25)