Skip to content

Commit 8c6e42a

Browse files
committed
CI: Re-add Py2.7 test support by using the pre-installed system Python 2.7.
1 parent 57a4469 commit 8c6e42a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,21 @@ jobs:
5555

5656
- name: Set up Python
5757
uses: actions/setup-python@v4
58+
if: startsWith(matrix.python-version, '3.')
5859
with:
5960
python-version: ${{ matrix.python_version }}
6061

62+
- name: Set up Python2 (Linux)
63+
if: matrix.python-version == '2.7' && startsWith(matrix.os, 'ubuntu')
64+
run: |
65+
sudo ln -fs python2 /usr/bin/python
66+
sudo apt-get update
67+
sudo apt-get install python-setuptools python2-dev
68+
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
69+
sudo python2 get-pip.py
70+
ls -l /usr/bin/pip* /usr/local/bin/pip*
71+
which pip
72+
6173
- name: Install Dependency
6274
run: |
6375
python -m pip install -U pip setuptools && python -m pip install -r requirements.txt

0 commit comments

Comments
 (0)