-
Notifications
You must be signed in to change notification settings - Fork 38
/
azure-pipelines.yml
39 lines (36 loc) · 1.02 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
name: continuous.$(date:yyyyMMdd)$(rev:.r)
pool:
vmImage: 'ubuntu-20.04'
variables:
buildConfiguration: 'Release'
steps:
# Install .net core sdk
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '3.1.x'
displayName: 'Install sdk 3.1.x'
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '5.0.x'
displayName: 'Install sdk 5.0.x'
# Build and test
- script: |
dotnet build Silverback.sln --configuration $(buildConfiguration) -warnaserror | tee build.log && grep -q 'Build succeeded' build.log
displayName: 'Build ($(buildConfiguration))'
- script: |
dotnet test Silverback.sln \
--configuration $(buildConfiguration) \
--no-build \
--verbosity Normal \
--logger trx \
--filter "CI!=false"
displayName: 'Run tests'
# Publish results
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
displayName: 'Publish test results'