Skip to content

Commit 6cdd49c

Browse files
committed
Fix broken tests in GitHub CI/CD
1 parent 0673756 commit 6cdd49c

1 file changed

Lines changed: 38 additions & 3 deletions

File tree

.github/workflows/test-pypa-ubuntu.yml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,60 @@ jobs:
1212
test:
1313
strategy:
1414
matrix:
15-
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8", "3.7"]
16-
os: ["ubuntu-22.04"]
1715
include:
16+
- python-version: "3.12"
17+
os: "ubuntu-22.04"
18+
- python-version: "3.11"
19+
os: "ubuntu-22.04"
20+
- python-version: "3.10"
21+
os: "ubuntu-22.04"
22+
- python-version: "3.9"
23+
os: "ubuntu-22.04"
24+
- python-version: "3.8"
25+
os: "ubuntu-22.04"
26+
- python-version: "3.7"
27+
os: "ubuntu-22.04"
1828
- python-version: "3.6"
1929
os: "ubuntu-20.04"
2030
- python-version: "3.5"
2131
os: "ubuntu-20.04"
2232

2333
runs-on: ${{ matrix.os }}
34+
env:
35+
GET_PIP_PATH_PREFIX: ${{ contains(fromJSON('["3.7", "3.6", "3.5"]'), matrix.python-version) && format('pip/{0}/', matrix.python-version) || '' }}
2436
steps:
2537
- uses: actions/checkout@v3
38+
with:
39+
submodules: 'true'
2640
- name: Include ppa repository
2741
run: sudo add-apt-repository ppa:deadsnakes/ppa
42+
2843
- name: Set up Python ${{ matrix.python-version }}
2944
run: |
3045
sudo apt-get install python${{ matrix.python-version }}-dev
3146
sudo update-alternatives --install /usr/bin/python3 python3 `which python${{ matrix.python-version }}` 1
3247
sudo update-alternatives --install /usr/bin/python3-config python3-config `which python${{ matrix.python-version }}-config` 1
48+
49+
- name: Install disutils package
50+
if: contains(fromJSON('["3.5"]'), matrix.python-version) == false
51+
run: sudo apt-get install python${{ matrix.python-version }}-distutils
52+
53+
- name: Download get-pip.py
54+
run: curl https://bootstrap.pypa.io/${{ env.GET_PIP_PATH_PREFIX }}get-pip.py -o get-pip.py
55+
56+
- name: Install pip
57+
run: python3 get-pip.py
58+
59+
# TODO: try to remove this after unpining redis
60+
- name: Install setuptools
61+
if: contains(fromJSON('["3.12"]'), matrix.python-version)
62+
run: python3 get-pip.py "setuptools"
63+
64+
- name: Install requirements
65+
run: python3 -m pip install -r requirements.txt
66+
3367
- name: Install requirements for testing
34-
run: sudo python3 -m pip install mockito
68+
run: python3 -m pip install mockito
69+
3570
- name: Run tests
3671
run: python3 -m unittest tests

0 commit comments

Comments
 (0)