forked from 2881099/FreeRedis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
46 lines (46 loc) · 1.78 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
jobs:
- job: build_and_run_ut_by_linux
displayName: Build and Run Unit Test By (Ubuntu:Latest)
timeoutInMinutes: 120
pool:
vmImage: ubuntu-latest
steps:
- task: DockerCompose@0
displayName: "Deploy Docker Compose"
inputs:
action: 'Run a Docker Compose command'
containerregistrytype: 'Container Registry'
dockerComposeFile: '$(Build.SourcesDirectory)/docker-compose.yml'
dockerComposeFileArgs: |
workDirectory=$(Build.SourcesDirectory)
dockerComposeCommand: up -d
- task: UseDotNet@2
displayName: "Install .NET Core SDK"
inputs:
version: 5.0.100
- task: UseDotNet@2
displayName: "Install .NET Core SDK"
inputs:
version: 3.1.403
- script: bash scripts/build.sh
displayName: "Build"
- script: bash scripts/test.sh
displayName: "Run Unit Test"
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4
displayName: ReportGenerator
inputs:
reports: "$(Build.SourcesDirectory)/test/Unit/*/TestResults/*/coverage.cobertura.xml"
targetdir: "$(Build.SourcesDirectory)/CodeCoverage"
reporttypes: "Cobertura"
assemblyfilters: "-xunit*"
- script: bash <(curl -s https://codecov.io/bash)
displayName: "Upload to codecov.io"
- task: DockerCompose@0
displayName : "Down Docker Compose"
inputs:
action: 'Run a Docker Compose command'
containerregistrytype: 'Container Registry'
dockerComposeFile: '$(Build.SourcesDirectory)/docker-compose.yml'
dockerComposeFileArgs: |
workDirectory=$(Build.SourcesDirectory)
dockerComposeCommand: down --remove-orphans