forked from charlesdevandiere/graphql-query-builder-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
53 lines (42 loc) · 1.46 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
51
52
53
name: $(GitVersion.FullSemVer)
pool:
vmImage: 'ubuntu-latest'
variables:
buildConfiguration: Release
trigger:
batch: 'true'
branches:
include:
- master
paths:
exclude:
- docs/*
- README.md
steps:
- task: UseGitVersion@5
displayName: GitVersion
inputs:
versionSpec: '5.x'
- script: dotnet tool restore
displayName: 'Restore tools'
- script: dotnet build -c $(buildConfiguration)
displayName: 'Build'
- script: dotnet test --no-build -c $(buildConfiguration) --logger xunit -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:Exclude="[*]Shared.Models.*"
displayName: 'Test'
- script: dotnet pack ./src/GraphQL.Query.Builder/GraphQL.Query.Builder.csproj --no-build -c $(buildConfiguration) -o $(Build.ArtifactStagingDirectory)/out -p:Version=$(GitVersion.SemVer)
displayName: 'Pack'
- task: PublishTestResults@2
displayName: 'Publish test results'
inputs:
testRunner: xUnit
testResultsFiles: '**/TestResults.xml'
- script: dotnet tool run reportgenerator -reports:**/coverage.cobertura.xml -targetdir:tests/coverage -reportTypes:Cobertura
displayName: 'Generate code coverage report'
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage'
inputs:
codeCoverageTool: cobertura
summaryFileLocation: ./tests/coverage/Cobertura.xml
- publish: $(Build.ArtifactStagingDirectory)/out
artifact: out
displayName: Publish artifact