|
| 1 | +jobs: |
| 2 | + - |
| 3 | + job: Test |
| 4 | + strategy: |
| 5 | + matrix: |
| 6 | + LinuxPython27: |
| 7 | + python.version: '2.7' |
| 8 | + imageName: ubuntu-16.04 |
| 9 | + extraActions: 'false' |
| 10 | + LinuxPython35: |
| 11 | + python.version: '3.5' |
| 12 | + imageName: ubuntu-16.04 |
| 13 | + extraActions: 'false' |
| 14 | + LinuxPython36: |
| 15 | + python.version: '3.6' |
| 16 | + imageName: ubuntu-16.04 |
| 17 | + extraActions: 'false' |
| 18 | + LinuxPython37: |
| 19 | + python.version: '3.7' |
| 20 | + imageName: ubuntu-16.04 |
| 21 | + extraActions: 'true' |
| 22 | + MacPython27: |
| 23 | + python.version: '2.7' |
| 24 | + imageName: macos-10.13 |
| 25 | + extraActions: 'false' |
| 26 | + MacPython35: |
| 27 | + python.version: '3.5' |
| 28 | + imageName: macos-10.13 |
| 29 | + extraActions: 'false' |
| 30 | + MacPython36: |
| 31 | + python.version: '3.6' |
| 32 | + imageName: macos-10.13 |
| 33 | + extraActions: 'false' |
| 34 | + MacPython37: |
| 35 | + python.version: '3.7' |
| 36 | + imageName: macos-10.13 |
| 37 | + extraActions: 'false' |
| 38 | + WindowsPython27: |
| 39 | + python.version: '2.7' |
| 40 | + imageName: vs2017-win2016 |
| 41 | + extraActions: 'false' |
| 42 | + WindowsPython35: |
| 43 | + python.version: '3.5' |
| 44 | + imageName: vs2017-win2016 |
| 45 | + extraActions: 'false' |
| 46 | + WindowsPython36: |
| 47 | + python.version: '3.6' |
| 48 | + imageName: vs2017-win2016 |
| 49 | + extraActions: 'false' |
| 50 | + WindowsPython37: |
| 51 | + python.version: '3.7' |
| 52 | + imageName: vs2017-win2016 |
| 53 | + extraActions: 'false' |
| 54 | + maxParallel: 10 |
| 55 | + pool: |
| 56 | + vmImage: $(imageName) |
| 57 | + steps: |
| 58 | + - |
| 59 | + task: UsePythonVersion@0 |
| 60 | + inputs: |
| 61 | + versionSpec: $(python.version) |
| 62 | + architecture: x64 |
| 63 | + - |
| 64 | + script: 'python -m pip install --upgrade pip && pip install -r test_requirements.txt && pip install pytest' |
| 65 | + displayName: 'Install mbed-os test dependencies' |
| 66 | + - |
| 67 | + script: | |
| 68 | + pip install --user flake8 |
| 69 | + python -m flake8 |
| 70 | + condition: eq(variables['extraActions'], 'true') |
| 71 | + displayName: 'Enforce code style' |
| 72 | + - |
| 73 | + script: "python -m coverage run setup.py test" |
| 74 | + displayName: "Test mbed-os-tools" |
| 75 | + - |
| 76 | + script: "pip install ." |
| 77 | + displayName: "Install mbed-os-tools" |
| 78 | + - |
| 79 | + script: 'pip install . && pip install -r test_requirements.txt' |
| 80 | + displayName: 'Install mbed-ls' |
| 81 | + workingDirectory: 'packages/mbed-ls' |
| 82 | + - |
| 83 | + script: 'pip install . && pip install -r test_requirements.txt' |
| 84 | + displayName: 'Install mbed-host-tests' |
| 85 | + workingDirectory: 'packages/mbed-host-tests' |
| 86 | + - |
| 87 | + script: 'pip install . && pip install -r test_requirements.txt' |
| 88 | + displayName: 'Install mbed-greentea' |
| 89 | + workingDirectory: 'packages/mbed-greentea' |
| 90 | + - |
| 91 | + script: "python -m coverage run setup.py test" |
| 92 | + displayName: "Test mbed-ls" |
| 93 | + workingDirectory: 'packages/mbed-ls' |
| 94 | + - |
| 95 | + script: "python -m coverage run setup.py test" |
| 96 | + displayName: "Test mbed-host-tests" |
| 97 | + workingDirectory: 'packages/mbed-host-tests' |
| 98 | + - |
| 99 | + script: "python -m coverage run setup.py test" |
| 100 | + displayName: "Test mbed-greentea" |
| 101 | + workingDirectory: 'packages/mbed-greentea' |
| 102 | + - |
| 103 | + script: | |
| 104 | + python -m coverage combine .coverage packages/*/.coverage |
| 105 | + python -m coveralls |
| 106 | + condition: eq(variables['extraActions'], 'true') |
| 107 | + displayName: 'Send coverage results to coveralls' |
| 108 | + - |
| 109 | + job: Build |
| 110 | + dependsOn: Test |
| 111 | + pool: |
| 112 | + vmImage: Ubuntu-16.04 |
| 113 | + steps: |
| 114 | + - |
| 115 | + task: UsePythonVersion@0 |
| 116 | + inputs: |
| 117 | + versionSpec: 3.x |
| 118 | + architecture: x64 |
| 119 | + - |
| 120 | + script: 'python setup.py sdist' |
| 121 | + displayName: 'Build sdist' |
0 commit comments