1818 strategy :
1919 matrix :
2020 python-version : ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
21- os : [ windows-latest, macos-latest, ubuntu-20.04 ]
21+ os : [ windows-latest, macos-latest, ubuntu-latest ]
2222 exclude : # Python < v3.8 does not support Apple Silicon ARM64.
2323 - python-version : " 3.5"
2424 os : macos-latest
3737 steps :
3838 - uses : actions/checkout@v4
3939
40+ - name : Run tests in Docker for legacy Python
41+ if : matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)
42+ run : |
43+ docker run --rm -v ${{ github.workspace }}:/app -w /app python:${{ matrix.python-version }} bash -c "
44+ pip install --upgrade pip &&
45+ pip install pytest pytest-cov parameterized mock flake8 &&
46+ pip install -r requirements.txt &&
47+ flake8 configcatclient --count --show-source --statistics &&
48+ pytest configcatclienttests
49+ "
50+
4051 - name : Set up Python ${{ matrix.python-version }}
52+ if : ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
4153 uses : actions/setup-python@v5
4254 with :
4355 python-version : ${{ matrix.python-version }}
@@ -46,25 +58,29 @@ jobs:
4658 PIP_TRUSTED_HOST : " pypi.python.org pypi.org files.pythonhosted.org"
4759
4860 - name : Install dependencies
61+ if : ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
4962 run : |
5063 python -m pip install --upgrade pip
5164 pip install pytest pytest-cov parameterized mock flake8
5265 pip install -r requirements.txt
5366
5467 - name : Lint with flake8
68+ if : ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
5569 run : |
5670 # Statical analysis
5771 flake8 configcatclient --count --show-source --statistics
5872
5973 - name : Test
74+ if : ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
6075 run : pytest configcatclienttests
6176
6277
6378 coverage :
6479 needs : [ test ]
65- runs-on : ubuntu-20.04
80+ runs-on : ubuntu-latest
6681 steps :
6782 - uses : actions/checkout@v4
83+
6884 - name : Set up Python
6985 uses : actions/setup-python@v5
7086 with :
0 commit comments