Skip to content

Commit 087ed2e

Browse files
authored
Add os specific builds in tox (#98)
1 parent be7c288 commit 087ed2e

File tree

2 files changed

+61
-12
lines changed

2 files changed

+61
-12
lines changed

.travis.yml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,39 @@
11
language: python
22
matrix:
33
include:
4-
- python: 2.7
4+
- os: linux
5+
name: "Python 2.7 on Linux"
6+
python: '2.7'
57
env:
6-
- TOX_ENV=py27
7-
- python: 3.6
8+
- TOX_ENV=py27-mylinux
9+
- os: linux
10+
name: "Python 3.6 on Linux"
11+
python: '3.6'
812
env:
9-
- TOX_ENV=py36
10-
- python: 3.7
11-
env:
12-
- TOX_ENV=py37
13+
- TOX_ENV=py36-mylinux
14+
- os: linux
15+
name: "Python 3.7 on Xenial Linux"
16+
python: '3.7'
1317
dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069)
14-
sudo: required # required for Python 3.7 (travis-ci/travis-ci#9069)
18+
env:
19+
- TOX_ENV=py37-mylinux
20+
- os: osx
21+
name: "Python 3.6 on MacOs"
22+
language: shell
23+
python: '3.6'
24+
env:
25+
- TOX_ENV=py36-mymacos
26+
before_install:
27+
- set TRAVIS_PYTHON_VERSION='3.6'
28+
- os: windows
29+
language: sh
30+
env:
31+
- TOX_ENV=py37-mywin
32+
before_install:
33+
- choco install python3
34+
- export PATH="/c/Python37:/c/Python37/Scripts:$PATH"
35+
- set TRAVIS_PYTHON_VERSION='3.6'
1536
install:
16-
- pip install tox
17-
script: tox -e $TOX_ENV
37+
- pip install --upgrade tox
38+
script:
39+
- tox -e $TOX_ENV

tox.ini

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py27,py36,py37
2+
envlist = py{27,36,37}-mylinux,py36-mymacos,py37-mywin
33

44
# Comment to build sdist and install into virtualenv
55
# This is helpful to test installation but takes extra time
@@ -17,14 +17,41 @@ deps =
1717
nose
1818
mock
1919
coverage
20+
wheel
2021
py{36,37}: mypy
22+
platform = mylinux: linux
23+
mymacos: darwin
2124
setenv =
2225
AWS_DEFAULT_REGION = us-west-2
2326
commands =
2427
flake8 .
28+
pip install --upgrade pip
29+
pip install --upgrade wheel
2530
{toxinidir}/scripts/ci/sdk_install
2631
{toxinidir}/scripts/ci/run_tests
2732
py{36,37}: mypy --ignore-missing-imports --no-strict-optional ask-sdk/ask_sdk
2833
py{36,37}: mypy --ignore-missing-imports --no-strict-optional ask-sdk-core/ask_sdk_core
2934
py{36,37}: mypy --ignore-missing-imports --no-strict-optional ask-sdk-runtime/ask_sdk_runtime
30-
py{36,37}: mypy --ignore-missing-imports --no-strict-optional ask-sdk-dynamodb-persistence-adapter/ask_sdk_dynamodb
35+
py{36,37}: mypy --ignore-missing-imports --no-strict-optional ask-sdk-dynamodb-persistence-adapter/ask_sdk_dynamodb
36+
37+
[testenv:py37-mywin]
38+
deps =
39+
flake8
40+
nose
41+
mock
42+
coverage
43+
wheel
44+
mypy
45+
platform = mywin: win32
46+
setenv =
47+
AWS_DEFAULT_REGION = us-west-2
48+
commands =
49+
flake8 .
50+
pip install --upgrade pip
51+
pip install --upgrade wheel
52+
python {toxinidir}\scripts\ci\sdk_install
53+
python {toxinidir}\scripts\ci\run_tests
54+
mypy --ignore-missing-imports --no-strict-optional ask-sdk\ask_sdk
55+
mypy --ignore-missing-imports --no-strict-optional ask-sdk-core\ask_sdk_core
56+
mypy --ignore-missing-imports --no-strict-optional ask-sdk-runtime\ask_sdk_runtime
57+
mypy --ignore-missing-imports --no-strict-optional ask-sdk-dynamodb-persistence-adapter\ask_sdk_dynamodb

0 commit comments

Comments
 (0)