-
Notifications
You must be signed in to change notification settings - Fork 1
/
Azure-Pipeline-CI.yml
34 lines (33 loc) · 980 Bytes
/
Azure-Pipeline-CI.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
jobs:
- job: Job_1
displayName: Agent job 1
pool:
vmImage: windows-latest
steps:
- checkout: self
- task: PowerShell@2
displayName: Start Local SQL Instance
inputs:
targetType: inline
script: >
'sqllocaldb start mssqllocaldb'
- task: PowerShell@2
displayName: Start Local PostgreSQL Instance
inputs:
targetType: inline
script: >-
cd "C:\Program Files\PostgreSQL\14\bin"
.\pg_ctl.exe -D "C:\Program Files\PostgreSQL\14\data" start
- task: CmdLine@2
displayName: 'Create PostgreSql Test Database '
enabled: False
inputs:
script: >
"C:\Program Files\PostgreSQL\14\bin\psql" -c "CREATE DATABASE unit_test_db" "user=postgres dbname=postgres password=root"
- task: DotNetCoreCLI@2
displayName: dotnet test
inputs:
command: test
projects: '**/*[Tt]ests/*.csproj'
arguments: --configuration $(BuildConfiguration)
...