-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Travis: add test for windows + osx (test)
- Loading branch information
Showing
1 changed file
with
26 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,26 @@ | ||
language: python | ||
python: | ||
- 3.6 | ||
- 3.7 | ||
- 3.8 | ||
before_install: | ||
- python --version | ||
- pip install -U pip | ||
install: | ||
- pip install ".[dev]" . | ||
script: | ||
- python -m unittest discover -s tests -t . | ||
language: python # this works for Linux but is an error on macOS or Windows | ||
jobs: | ||
include: | ||
- name: "Python 3.6.0 on Xenial Linux" | ||
python: 3.6 | ||
- name: "Python 3.7.0 on Xenial Linux" | ||
python: 3.7 | ||
- name: "Python 3.8.0 on Xenial Linux" | ||
python: 3.8 # this works for Linux but is ignored on macOS or Windows | ||
- name: "Python 3.7.4 on macOS" | ||
os: osx | ||
osx_image: xcode11.2 # Python 3.7.4 running on macOS 10.14.4 | ||
language: shell # 'language: python' is an error on Travis CI macOS | ||
- name: "Python 3.8.0 on Windows" | ||
os: windows # Windows 10.0.17134 N/A Build 17134 | ||
language: shell # 'language: python' is an error on Travis CI Windows | ||
before_install: | ||
- choco install python --version 3.8.0 | ||
- python -m pip install --upgrade pip | ||
env: PATH=/c/Python38:/c/Python38/Scripts:$PATH | ||
install: | ||
- pip3 install --upgrade pip # all three OSes agree about 'pip3' | ||
- pip3 install ".[dev]" . | ||
# '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 but 'py' works on Windows only | ||
script: python -m unittest discover -s tests -t . || python3 -m unittest discover -s tests -t . |