-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (63 loc) · 3.6 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
os: linux
arch: x64
language: python
env: PYTHON=python # 'python' points to Python 2.7 on macOS but points to Python 3.8 on Linux and Windows; 'python3' is a 'command not found' error on Windows
install: # NB: you can't have a colon anywhere in the line (hence '%c' % 58)
- $PYTHON -c 'import sys,struct,platform;print("{\n%s}"%"".join(" %25r %c %r,\n"%(c,58,eval(c)) for c in """struct.calcsize("P")*8 sys.maxsize platform.machine() platform.architecture()""".split()))'
- $PYTHON -m pip install --upgrade pip
- $PYTHON -m pip install pytest
- $PYTHON -m pip install .
#- $PYTHON -m pip install -r requirements.txt
script:
- $PYTHON -m pytest -v .
matrix:
include:
#- python: "2.6" # update 20200807: Travis no longer supports this
- python: "2.7"
#- python: "3.2" # pytest does not support this version; update 20200807: Travis no longer supports this either
#- python: "3.3" # pytest does not support this version; update 20200807: Travis no longer supports this either
- python: "3.4"
- python: "3.5"
- python: "3.6"
- python: "3.7"
- python: "3.8"
- python: "3.9-dev" # no full release of 3.9 available on Travis as at 20200807
#- name: "Python 3.8 on 32-bit Linux"
# arch: x86 # weirdly, the architecture is reported as i386 in the Travis matrix, but sys.maxsize is still 9223372036854775807, platform.machine() is still 'x86_64' and platform.architecture() is still ('64bit', 'ELF')
# python: 3.8
- name: "Python 2.x on macOS"
os: osx # seems to come with python and python3 but it's less clear how to take control of precise version---maybe via `brew install pyenv-virtualenv` (which takes a loooong time) plus (unknown) extra steps
language: generic
env: PYTHON=python2
- name: "Python 3.x on macOS"
os: osx
language: generic
env: PYTHON=python3
#- name: "Python 2.7 on Windows"
# os: windows
# language: shell
# env:
# - PYTHON=python
# - PATH=/c/Python27:/c/Python27/Scripts:$PATH # note that the path must change according to the Python version
# before_install:
# - choco install python --version=2.7.11 # 2.7.11 appears to be the last 2.x version chocolatey offers, and you can't get away with saying just 2.7
# - $PYTHON -m ensurepip # Python 2.7 for Windows seems to ship without pip
# # Unfortunately ensurepip fails with an AttributeError deep inside pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/distlib/scripts.py
# # So that's a deal-breaker, unless we somehow work around the complete absence of pip
- name: "Python 3.8 on Windows"
os: windows
language: shell
env:
- PYTHON=python
- PATH=/c/Python38:/c/Python38/Scripts:$PATH # note that the path must change according to the Python version
before_install:
- choco install python --version=3.8
#- name: "Python 3.8 on 32-bit Windows"
# os: windows
# arch: x86 # This appears to have no effect. The architecture is still reported as AMD64 in the Travis matrix, and the printed values all show that 64-bit Python is running
# language: shell
# env:
# - PYTHON=python
# - PATH=/c/Python38:/c/Python38/Scripts:$PATH # note that the path must change according to the Python version
# before_install:
# - choco install python --version=3.8