Skip to content

Commit ea17008

Browse files
Merge pull request #171 from bridadan/use_sdist_packages
Use sdist packages during testing
2 parents f224c48 + 2f3ed41 commit ea17008

File tree

3 files changed

+61
-60
lines changed

3 files changed

+61
-60
lines changed

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include README.md
2+
include test_requirements.txt

azure-pipelines.yml

Lines changed: 58 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -4,53 +4,53 @@ jobs:
44
strategy:
55
matrix:
66
LinuxPython27:
7-
python.version: '2.7'
7+
python.version: "2.7"
88
imageName: ubuntu-16.04
9-
extraActions: 'false'
9+
extraActions: "false"
1010
LinuxPython35:
11-
python.version: '3.5'
11+
python.version: "3.5"
1212
imageName: ubuntu-16.04
13-
extraActions: 'false'
13+
extraActions: "false"
1414
LinuxPython36:
15-
python.version: '3.6'
15+
python.version: "3.6"
1616
imageName: ubuntu-16.04
17-
extraActions: 'false'
17+
extraActions: "false"
1818
LinuxPython37:
19-
python.version: '3.7'
19+
python.version: "3.7"
2020
imageName: ubuntu-16.04
21-
extraActions: 'true'
21+
extraActions: "true"
2222
MacPython27:
23-
python.version: '2.7'
23+
python.version: "2.7"
2424
imageName: macos-10.13
25-
extraActions: 'false'
25+
extraActions: "false"
2626
MacPython35:
27-
python.version: '3.5'
27+
python.version: "3.5"
2828
imageName: macos-10.13
29-
extraActions: 'false'
29+
extraActions: "false"
3030
MacPython36:
31-
python.version: '3.6'
31+
python.version: "3.6"
3232
imageName: macos-10.13
33-
extraActions: 'false'
33+
extraActions: "false"
3434
MacPython37:
35-
python.version: '3.7'
35+
python.version: "3.7"
3636
imageName: macos-10.13
37-
extraActions: 'false'
37+
extraActions: "false"
3838
WindowsPython27:
39-
python.version: '2.7'
39+
python.version: "2.7"
4040
imageName: vs2017-win2016
41-
extraActions: 'false'
41+
extraActions: "false"
4242
WindowsPython35:
43-
python.version: '3.5'
43+
python.version: "3.5"
4444
imageName: vs2017-win2016
45-
extraActions: 'false'
45+
extraActions: "false"
4646
WindowsPython36:
47-
python.version: '3.6'
47+
python.version: "3.6"
4848
imageName: vs2017-win2016
49-
extraActions: 'false'
49+
extraActions: "false"
5050
WindowsPython37:
51-
python.version: '3.7'
51+
python.version: "3.7"
5252
imageName: vs2017-win2016
53-
extraActions: 'false'
53+
extraActions: "false"
5454
maxParallel: 10
5555
pool:
5656
vmImage: $(imageName)
@@ -61,64 +61,68 @@ jobs:
6161
versionSpec: $(python.version)
6262
architecture: x64
6363
-
64-
script: 'python -m pip install --upgrade pip && pip install -r test_requirements.txt'
65-
displayName: 'Install mbed-os test dependencies'
64+
script: "python -m pip install --upgrade pip && pip install -r test_requirements.txt"
65+
displayName: "Install mbed-os test dependencies"
6666
-
6767
script: |
6868
pip install --user flake8==3.7.3
6969
python -m flake8
7070
condition: eq(variables['extraActions'], 'true')
71-
displayName: 'Enforce code style'
71+
displayName: "Enforce code style"
7272
-
7373
script: 'pip install --user "urllib3<1.25"'
74-
displayName: 'Fix dependency issue for requests package'
74+
displayName: "Fix dependency issue for requests package"
7575
-
7676
script: "python -m coverage run setup.py test"
7777
displayName: "Test mbed-os-tools"
7878
-
79-
script: "pip install ."
79+
bash: "python setup.py sdist && pip install dist/*"
8080
displayName: "Install mbed-os-tools"
8181
-
82-
script: 'pip install . && pip install -r test_requirements.txt'
83-
displayName: 'Install mbed-ls'
84-
workingDirectory: 'packages/mbed-ls'
82+
bash: "python setup.py sdist && pip install dist/*"
83+
displayName: "Install mbed-ls"
84+
workingDirectory: "packages/mbed-ls"
8585
-
86-
script: 'pip install . && pip install -r test_requirements.txt'
87-
displayName: 'Install mbed-host-tests'
88-
workingDirectory: 'packages/mbed-host-tests'
86+
bash: "python setup.py sdist && pip install dist/*"
87+
displayName: "Install mbed-host-tests"
88+
workingDirectory: "packages/mbed-host-tests"
8989
-
90-
script: 'pip install . && pip install -r test_requirements.txt'
91-
displayName: 'Install mbed-greentea'
92-
workingDirectory: 'packages/mbed-greentea'
90+
bash: "python setup.py sdist && pip install dist/*"
91+
displayName: "Install mbed-greentea"
92+
workingDirectory: "packages/mbed-greentea"
9393
-
9494
script: "python -m coverage run setup.py test"
9595
displayName: "Test mbed-ls"
96-
workingDirectory: 'packages/mbed-ls'
96+
workingDirectory: "packages/mbed-ls"
9797
-
9898
script: "python -m coverage run setup.py test"
9999
displayName: "Test mbed-host-tests"
100-
workingDirectory: 'packages/mbed-host-tests'
100+
workingDirectory: "packages/mbed-host-tests"
101101
-
102102
script: "python -m coverage run setup.py test"
103103
displayName: "Test mbed-greentea"
104-
workingDirectory: 'packages/mbed-greentea'
104+
workingDirectory: "packages/mbed-greentea"
105105
-
106106
script: |
107107
python -m coverage combine .coverage packages/*/.coverage
108108
python -m coveralls
109109
condition: eq(variables['extraActions'], 'true')
110-
displayName: 'Send coverage results to coveralls'
111-
-
112-
job: Build
113-
dependsOn: Test
114-
pool:
115-
vmImage: Ubuntu-16.04
116-
steps:
110+
displayName: "Send coverage results to coveralls"
117111
-
118-
task: UsePythonVersion@0
119-
inputs:
120-
versionSpec: 3.x
121-
architecture: x64
112+
script: "pip uninstall -y mbed-os-tools mbed-ls mbed-greentea mbed-host-tests"
113+
displayName: "Uninstall sdist packages"
122114
-
123-
script: 'python setup.py sdist'
124-
displayName: 'Build sdist'
115+
script: "pip install ."
116+
displayName: "Ensure mbed-os-tools can be installed locally for development"
117+
-
118+
script: "pip install ."
119+
displayName: "Ensure mbed-ls can be installed locally for development"
120+
workingDirectory: "packages/mbed-ls"
121+
-
122+
script: "pip install ."
123+
displayName: "Ensure mbed-host-tests can be installed locally for development"
124+
workingDirectory: "packages/mbed-host-tests"
125+
-
126+
script: "pip install ."
127+
displayName: "Ensure mbed-greentea can be installed locally for development"
128+
workingDirectory: "packages/mbed-greentea"

setup.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,7 @@ def read(fname):
5757
"six>=1.0,<2.0",
5858
"colorama>=0.3,<0.5",
5959
],
60-
tests_require=[
61-
"coverage>=4,<5",
62-
"coveralls>=1,<2",
63-
"mock>=2,<4",
64-
"pytest>=3,<5",
65-
],
60+
tests_require=read("test_requirements.txt").splitlines(),
6661
extras_require={
6762
"pyocd": ["pyocd==0.14.0"]
6863
},

0 commit comments

Comments
 (0)