Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
170 lines (162 sloc) 4.77 KB
resources:
- repo: self
trigger:
branches:
include:
- master
paths:
exclude:
- README.md
- docs/*
- CODEOWNERS
pr:
branches:
include:
- master
paths:
exclude:
- README.md
- docs/*
- CODEOWNERS
variables:
runTests: True
jobs:
- job: Style
condition: eq(variables.runTests, 'True')
pool:
vmImage: ubuntu-16.04
steps:
- task: AzureCLI@1
displayName: 'Style Check'
inputs:
azureSubscription: 'Findable Incubation(ca9d21ff-2a46-4e8b-bf06-8d65242342e5)'
scriptLocation: inlineScript
inlineScript: 'sbt scalastyle test:scalastyle it:scalastyle'
- job: PublishAndE2E
pool:
vmImage: ubuntu-16.04
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- bash: conda env create -f environment.yaml
displayName: Create Anaconda environment
- task: AzureKeyVault@1
inputs:
azureSubscription: 'Findable Incubation(ca9d21ff-2a46-4e8b-bf06-8d65242342e5)'
keyVaultName: mmlspark-keys
- bash: |
source activate mmlspark
sbt packagePython
sbt publishBlob publishDocs publishR
sbt genBuildInfo
echo "##vso[task.uploadsummary]$(pwd)/target/Build.md"
displayName: Publish Artifacts
env:
STORAGE_KEY: $(storage-key)
- task: AzureCLI@1
displayName: 'E2E'
inputs:
azureSubscription: 'Findable Incubation(ca9d21ff-2a46-4e8b-bf06-8d65242342e5)'
scriptLocation: inlineScript
inlineScript: 'sbt it:test'
condition: eq(variables.runTests, 'True')
- task: PublishTestResults@2
displayName: 'Publish Test Results **/test-reports/*.xml'
inputs:
testResultsFiles: '**/test-reports/*.xml'
failTaskOnFailedTests: true
condition: and(eq(variables.runTests, 'True'), succeededOrFailed())
- job: PythonTests
condition: eq(variables.runTests, 'True')
pool:
vmImage: ubuntu-16.04
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- bash: conda env create -f environment.yaml
displayName: Create Anaconda environment
- bash: |
source activate mmlspark
sbt testPython
displayName: Test Python Code
- task: PublishTestResults@2
displayName: 'Publish Test Results **/test-reports/*.xml'
inputs:
testResultsFiles: 'target/**/generated/test_results/python/*.xml'
failTaskOnFailedTests: true
condition: succeededOrFailed()
- job: UnitTests
condition: eq(variables.runTests, 'True')
pool:
vmImage: ubuntu-16.04
strategy:
matrix:
automl:
PACKAGE: "automl"
cntk:
PACKAGE: "cntk"
cognitive:
PACKAGE: "cognitive"
core:
PACKAGE: "core"
downloader:
PACKAGE: "downloader"
featurize:
PACKAGE: "featurize"
image:
PACKAGE: "image"
io:
PACKAGE: "io"
flaky:
PACKAGE: "flaky" #TODO fix flaky test so isolation is not needed
lightgbm1:
PACKAGE: "lightgbm.split1" #TODO speed up LGBM Tests and remove split
lightgbm2:
PACKAGE: "lightgbm.split2"
lime:
PACKAGE: "lime"
opencv:
PACKAGE: "opencv"
recommendation:
PACKAGE: "recommendation"
stages:
PACKAGE: "stages"
train:
PACKAGE: "train"
steps:
- task: AzureCLI@1
displayName: 'Setup repo'
inputs:
azureSubscription: 'Findable Incubation(ca9d21ff-2a46-4e8b-bf06-8d65242342e5)'
scriptLocation: inlineScript
inlineScript: 'pip install requests && sbt getDatasets'
- task: AzureCLI@1
displayName: 'Unit Test'
timeoutInMinutes: 20
inputs:
azureSubscription: 'Findable Incubation(ca9d21ff-2a46-4e8b-bf06-8d65242342e5)'
scriptLocation: inlineScript
inlineScript: 'sbt coverage "testOnly com.microsoft.ml.spark.$(PACKAGE).**"'
- task: PublishTestResults@2
displayName: 'Publish Test Results **/test-reports/*.xml'
inputs:
testResultsFiles: '**/test-reports/*.xml'
failTaskOnFailedTests: true
condition: succeededOrFailed()
- task: AzureCLI@1
displayName: 'Generate Codecov report'
inputs:
azureSubscription: 'Findable Incubation(ca9d21ff-2a46-4e8b-bf06-8d65242342e5)'
scriptLocation: inlineScript
inlineScript: 'sbt coverageReport'
condition: succeededOrFailed()
- task: AzureKeyVault@1
inputs:
azureSubscription: 'Findable Incubation(ca9d21ff-2a46-4e8b-bf06-8d65242342e5)'
keyVaultName: mmlspark-keys
- bash: |
bash <(curl -s https://codecov.io/bash)
displayName: Upload Coverage Report To Codecov.io
timeoutInMinutes: 5
env:
CODECOV_TOKEN: $(codecov-token)
You can’t perform that action at this time.