-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
50 lines (46 loc) · 1.6 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# MATLAB Test Pipeline
#
# Choose between a self-hosted or Microsoft hosted agent.
# (The agent is the computer than runs the tests.)
#
# Refer to these websites for help when modifying this file:
# https://marketplace.visualstudio.com/items?itemName=MathWorks.matlab-azure-devops-extension
# https://qmrlab.org/2020/06/16/matlab-ci.html
# https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/dotnet-core-tool-installer?view=azure-devops&viewFallbackFrom=azure-devops.
trigger:
- master
########### Self-Hosted Agent ###########
#pool: Default
#steps:
# - bash: echo '##vso[task.prependpath]/usr/local/MATLAB/R2020b/bin' # Linux agent
#
# - task: UseDotNet@2
# displayName: 'Use .NET Core sdk'
# inputs:
# packageType: sdk
# version: 2.2.203
# installationPath: $(Agent.ToolsDirectory)/dotnet
##########################################
########### Microsoft-Hosted Agent ###########
pool:
vmimage: ubuntu-latest
steps:
- task: InstallMATLAB@0
inputs:
release: R2021a
##############################################
- task: RunMATLABTests@0
inputs:
codeCoverageCobertura: 'code-coverage/coverage.xml'
selectByFolder: 'tests'
sourceFolder: 'matlab'
testResultsJUnit: 'test-results/results.xml'
- task: PublishTestResults@1
condition: succeededOrFailed()
inputs:
testResultsFiles: 'test-results/results.xml'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: 'code-coverage/coverage.xml'