-
-
Notifications
You must be signed in to change notification settings - Fork 70
/
azure-pipelines.yml
56 lines (49 loc) · 1.79 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
54
55
56
trigger:
tags:
include:
- "v*"
branches:
exclude:
- "*"
pool:
vmImage: "ubuntu-latest"
variables:
buildConfiguration: "Release"
steps:
- script: |
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org
mkdir $(System.DefaultWorkingDirectory)/mongodb
mkdir $(System.DefaultWorkingDirectory)/mongodb/log
mongod --fork --replSet 'MyRep' --dbpath $(System.DefaultWorkingDirectory)/mongodb --logpath $(System.DefaultWorkingDirectory)/mongodb/log/mongod.log
mongosh --eval "rs.initiate()"
workingDirectory: "$(System.DefaultWorkingDirectory)"
displayName: "Install MongoDB"
- task: UseDotNet@2
displayName: "Use .Net SDK"
inputs:
packageType: "sdk"
version: "9.x"
- task: DotNetCoreCLI@2
displayName: "Run Tests"
inputs:
command: "test"
projects: "**/*[Tt]ests/*.csproj"
arguments: "--configuration $(BuildConfiguration)"
workingDirectory: "Tests"
# - task: DotNetCoreCLI@2
# displayName: "Make Nuget Package"
# inputs:
# command: "pack"
# packagesToPack: "MongoDB.Entities/MongoDB.Entities.csproj"
# versioningScheme: "off"
# verbosityPack: "Minimal"
# - task: NuGetCommand@2
# displayName: "Publish To Nuget"
# inputs:
# command: "push"
# packagesToPush: "$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg"
# nuGetFeedType: "external"
# publishFeedCredentials: "nuget-djnitehawk"