|
| 1 | +trigger: |
| 2 | +- master |
| 3 | + |
| 4 | +jobs: |
| 5 | +- job: 'Linux' |
| 6 | + pool: |
| 7 | + vmImage: 'ubuntu-latest' |
| 8 | + |
| 9 | + strategy: |
| 10 | + matrix: |
| 11 | + Python37: |
| 12 | + python.version: '3.7' |
| 13 | + |
| 14 | + steps: |
| 15 | + - task: UsePythonVersion@0 |
| 16 | + inputs: |
| 17 | + versionSpec: '$(python.version)' |
| 18 | + displayName: 'Use Python $(python.version)' |
| 19 | + |
| 20 | + - script: | |
| 21 | + python -m pip install --upgrade pip |
| 22 | + pip install -e .[dev] |
| 23 | + displayName: 'Install dependencies' |
| 24 | +
|
| 25 | + - script: | |
| 26 | + python -m flake8 nbresuse |
| 27 | + displayName: 'Lint' |
| 28 | +
|
| 29 | + - script: |
| 30 | + python -m pytest -vvv nbresuse --cov=nbresuse --junitxml=python_junit.xml --cov-report=xml --cov-branch |
| 31 | + displayName: 'Test' |
| 32 | + |
| 33 | + - task: PublishTestResults@2 |
| 34 | + condition: succeededOrFailed() |
| 35 | + inputs: |
| 36 | + testResultsFiles: 'python_junit.xml' |
| 37 | + testRunTitle: 'Publish test results for Python $(python.version) $(manylinux_flag)' |
| 38 | + |
| 39 | + - task: PublishCodeCoverageResults@1 |
| 40 | + inputs: |
| 41 | + codeCoverageTool: Cobertura |
| 42 | + summaryFileLocation: '$(System.DefaultWorkingDirectory)/*coverage.xml' |
| 43 | + |
| 44 | +- job: 'Mac' |
| 45 | + pool: |
| 46 | + vmImage: 'macos-10.14' |
| 47 | + |
| 48 | + strategy: |
| 49 | + matrix: |
| 50 | + Python37: |
| 51 | + python.version: '3.7' |
| 52 | + |
| 53 | + steps: |
| 54 | + - task: UsePythonVersion@0 |
| 55 | + inputs: |
| 56 | + versionSpec: '$(python.version)' |
| 57 | + displayName: 'Use Python $(python.version)' |
| 58 | + |
| 59 | + - script: | |
| 60 | + python -m pip install --upgrade pip |
| 61 | + pip install -e .[dev] |
| 62 | + displayName: 'Install dependencies' |
| 63 | +
|
| 64 | + - script: | |
| 65 | + python -m flake8 nbresuse |
| 66 | + displayName: 'Lint' |
| 67 | +
|
| 68 | + - script: | |
| 69 | + python -m pytest -vvv nbresuse --cov=nbresuse --junitxml=python_junit.xml --cov-report=xml --cov-branch |
| 70 | + displayName: 'Test' |
| 71 | +
|
| 72 | + - task: PublishTestResults@2 |
| 73 | + condition: succeededOrFailed() |
| 74 | + inputs: |
| 75 | + testResultsFiles: 'python_junit.xml' |
| 76 | + testRunTitle: 'Publish test results for Python $(python.version) $(manylinux_flag)' |
| 77 | + |
| 78 | + - task: PublishCodeCoverageResults@1 |
| 79 | + inputs: |
| 80 | + codeCoverageTool: Cobertura |
| 81 | + summaryFileLocation: '$(System.DefaultWorkingDirectory)/*coverage.xml' |
| 82 | + |
| 83 | +- job: 'Windows' |
| 84 | + pool: |
| 85 | + vmImage: 'vs2017-win2016' |
| 86 | + |
| 87 | + strategy: |
| 88 | + matrix: |
| 89 | + Python37: |
| 90 | + python.version: '3.7' |
| 91 | + |
| 92 | + steps: |
| 93 | + - task: UsePythonVersion@0 |
| 94 | + inputs: |
| 95 | + versionSpec: '$(python.version)' |
| 96 | + displayName: 'Use Python $(python.version)' |
| 97 | + |
| 98 | + - script: | |
| 99 | + which python > python.txt |
| 100 | + set /p PYTHON=<python.txt |
| 101 | + ln -s %PYTHON% %PYTHON%$(python.version) |
| 102 | + python --version |
| 103 | + which python$(python.version) |
| 104 | + displayName: "Which python" |
| 105 | +
|
| 106 | + - script: | |
| 107 | + python -m pip install --upgrade pip |
| 108 | + pip install -e .[dev] |
| 109 | + displayName: 'Install dependencies' |
| 110 | +
|
| 111 | + - script: | |
| 112 | + python -m flake8 nbresuse |
| 113 | + displayName: 'Lint' |
| 114 | +
|
| 115 | + - script: | |
| 116 | + python -m pytest -vvv nbresuse --cov=nbresuse --junitxml=python_junit.xml --cov-report=xml --cov-branch |
| 117 | + displayName: 'Test' |
| 118 | +
|
| 119 | + - task: PublishTestResults@2 |
| 120 | + condition: succeededOrFailed() |
| 121 | + inputs: |
| 122 | + testResultsFiles: 'python_junit.xml' |
| 123 | + testRunTitle: 'Publish test results for Python $(python.version) $(manylinux_flag)' |
| 124 | + |
| 125 | + - task: PublishCodeCoverageResults@1 |
| 126 | + inputs: |
| 127 | + codeCoverageTool: Cobertura |
| 128 | + summaryFileLocation: '$(System.DefaultWorkingDirectory)/*coverage.xml' |
0 commit comments