1010jobs :
1111 test :
1212 runs-on : ${{ matrix.os }}
13+ container : ${{ matrix.container }}
1314 strategy :
1415 fail-fast : false
1516 matrix :
3839 # python-version: pypy2
3940 # - os: ubuntu-latest
4041 # python-version: pypy3
42+ - os : ubuntu-latest
43+ container : centos:6
44+ python-version : 2.6
4145 # then test with the different optional dependencies installed
4246 - os : ubuntu-latest
4347 python-version : 3.6
@@ -121,28 +125,71 @@ jobs:
121125 opt-deps : ['m2crypto', 'gmpy', 'gmpy2', 'codeclimate']
122126 steps :
123127 - uses : actions/checkout@v2
128+ if : ${{ !matrix.container }}
129+ with :
130+ fetch-depth : 50
131+ - uses : actions/checkout@v1
132+ if : ${{ matrix.container }}
124133 with :
125134 fetch-depth : 50
135+ - name : Ensure dependencies on CentOS
136+ if : ${{ matrix.container }}
137+ run : |
138+ ls /etc/yum.repos.d/
139+ cat /etc/yum.repos.d/CentOS-Base.repo
140+ rm /etc/yum.repos.d/CentOS-Base.repo
141+ cat > /etc/yum.repos.d/CentOS-Base.repo <<EOF
142+ [base]
143+ name=CentOS-$releasever - Base
144+ baseurl=https://vault.centos.org/6.10/os/x86_64/
145+ gpgcheck=1
146+ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
147+
148+ [updates]
149+ name=CentOS-$releasever - Updates
150+ baseurl=https://vault.centos.org/6.10/updates/x86_64/
151+ gpgcheck=1
152+ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
153+
154+ [extras]
155+ name=CentOS-$releasever - Extras
156+ baseurl=https://vault.centos.org/6.10/extras/x86_64/
157+ gpgcheck=1
158+ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
159+
160+ EOF
161+ echo installing
162+ yum clean all
163+ yum repolist all
164+ yum install -y git make python curl gcc libffi-devel python-devel glibc-devel openssl-devel
126165 - name : Verify git status
127166 run : |
128167 git status
129168 git remote -v
130169 - name : Ensure we have baseline branch for quality coverage
131170 run : git fetch origin master:refs/remotes/origin/master
132171 - name : Set up Python ${{ matrix.python-version }}
172+ if : ${{ !matrix.container }}
133173 uses : actions/setup-python@v2
134174 with :
135175 python-version : ${{ matrix.python-version }}
136176 - name : Display Python version
137177 run : python -c "import sys; print(sys.version)"
138178 - name : Display installed python package versions
139- run : pip list
179+ run : |
180+ pip list || :
140181 - name : Ensure working pip on 3.3
141- # if: ${{ matrix.python-version == '3.3.7' }}
142182 if : ${{ matrix.python-version == '3.3' }}
143183 run : |
144184 curl -o get-pip.py https://bootstrap.pypa.io/3.3/get-pip.py;
145185 python get-pip.py
186+ - name : Ensure working pip on 2.6
187+ if : ${{ matrix.python-version == '2.6' }}
188+ run : |
189+ curl -o get-pip.py https://bootstrap.pypa.io/2.6/get-pip.py;
190+ python get-pip.py
191+ pip list
192+ pip install setuptools==28.8.0 wheel==0.30.0a0
146193 - name : Install M2Crypto
147194 if : ${{ contains(matrix.opt-deps, 'm2crypto') }}
148195 run : pip install --pre m2crypto
@@ -183,8 +230,12 @@ jobs:
183230 curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
184231 chmod +x ./cc-test-reporter
185232 ./cc-test-reporter before-build
186- - name : Run unit tests
233+ - name : Run unit tests (2.7+)
234+ if : ${{ matrix.python-version != '2.6' }}
187235 run : coverage run --branch --source tlslite -m unittest discover
236+ - name : Run unit tests (2.6)
237+ if : ${{ matrix.python-version == '2.6' }}
238+ run : coverage run --branch --source tlslite -m unittest2 discover
188239 - name : Run connection tests
189240 run : make test-local
190241 - name : Combine coverage from both test suites
@@ -197,9 +248,16 @@ jobs:
197248 - name : Verify install
198249 run : make test
199250 - name : Lint the code
251+ # pylint doesn't work on 2.6: https://bitbucket.org/logilab/pylint/issue/390/py26-compatiblity-broken
252+ if : ${{ matrix.python-version != '2.6' }}
200253 run : |
201254 pylint --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" tlslite > pylint_report.txt || :
202255 diff-quality --violations=pylint --fail-under=90 pylint_report.txt
256+ - name : Verify that intermediate commits are testable
257+ if : ${{ github.event.pull_request }}
258+ run : |
259+ echo $GITHUB_SHA
260+ echo $GITHUB_REF
203261
204262 - name : Publish coverage to Coveralls
205263 env :
0 commit comments