-
-
Notifications
You must be signed in to change notification settings - Fork 323
126 lines (97 loc) · 4.97 KB
/
dotnet.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Build and Run Tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build_and_test:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
1.0.4
2.1.x
3.1.x
5.0.x
6.0.x
7.0.x
- name: Setup MSBuild
uses: microsoft/[email protected]
with:
vs-version: '[17.0,18.0)'
- name: Setup NuGet
uses: NuGet/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
with:
nuget-version: '6.x'
- name: Install SQL Server
uses: Particular/[email protected]
with:
connection-string-env-var: SQL_SERVER_CONNECTION_STRING
catalog: Audit
extra-params: "Encrypt=False;"
- name: Extra SQL
shell: pwsh
run: |
echo "Execute SqlScript.sql"
sqlcmd -i ".\src\Audit.NET.SqlServer\SqlScript.sql" -d "master" -I
echo "Execute Demo.sql"
sqlcmd -i ".\test\Audit.EntityFramework.Core.UnitTest\Demo.sql" -d "master" -I
- name: Nuget Restore
run: nuget restore Audit.NET.sln
- name: Dotnet Restore
run: dotnet restore
- name: MsBuild Audit.EntityFramework.UnitTest
run: |
msbuild.exe .\test\Audit.EntityFramework.UnitTest -p:Configuration=Release
- name: Dotnet Build Audit.NET.sln
run: dotnet build .\Audit.NET.sln --no-restore --configuration release
#- name: Test Audit.IntegrationTest (AzureDocDb)
# run: dotnet test .\test\Audit.IntegrationTest --no-build --configuration release --verbosity normal --filter="TestCategory=AzureDocDb"
# env:
# AUDIT_NET_AZUREDOCDBAUTHKEY: ${{ secrets.AUDIT_NET_AZUREDOCDBAUTHKEY }}
# AUDIT_NET_AZUREDOCDBURL: ${{ secrets.AUDIT_NET_AZUREDOCDBURL }}
# AUDIT_NET_AZURETABLECNNSTRING: ${{ secrets.AUDIT_NET_AZURETABLECNNSTRING }}
# AUDIT_NET_AZUREBLOBSERVICEURL: ${{ secrets.AUDIT_NET_AZUREBLOBSERVICEURL }}
# AUDIT_NET_AZUREBLOBACCOUNTNAME: ${{ secrets.AUDIT_NET_AZUREBLOBACCOUNTNAME }}
# AUDIT_NET_AZUREBLOBACCOUNTKEY: ${{ secrets.AUDIT_NET_AZUREBLOBACCOUNTKEY }}
#- name: Test Audit.IntegrationTest (AzureStorage)
# run: dotnet test .\test\Audit.IntegrationTest --no-build --configuration release --verbosity normal --filter="TestCategory=AzureBlob|TestCategory=AzureStorageBlobs|TestCategory=AzureTables"
# env:
# AUDIT_NET_AZUREDOCDBAUTHKEY: ${{ secrets.AUDIT_NET_AZUREDOCDBAUTHKEY }}
# AUDIT_NET_AZUREDOCDBURL: ${{ secrets.AUDIT_NET_AZUREDOCDBURL }}
# AUDIT_NET_AZURETABLECNNSTRING: ${{ secrets.AUDIT_NET_AZURETABLECNNSTRING }}
# AUDIT_NET_AZUREBLOBSERVICEURL: ${{ secrets.AUDIT_NET_AZUREBLOBSERVICEURL }}
# AUDIT_NET_AZUREBLOBACCOUNTNAME: ${{ secrets.AUDIT_NET_AZUREBLOBACCOUNTNAME }}
# AUDIT_NET_AZUREBLOBACCOUNTKEY: ${{ secrets.AUDIT_NET_AZUREBLOBACCOUNTKEY }}
# AUDIT_NET_AZUREBLOBCNNSTRING: ${{ secrets.AUDIT_NET_AZUREBLOBCNNSTRING }}
- name: Test Audit.EntityFramework.Core.UnitTest
run: dotnet test .\test\Audit.EntityFramework.Core.UnitTest --no-build --configuration release --verbosity normal
#- name: Test Audit.AzureStorageTables.UnitTest
# run: dotnet test .\test\Audit.AzureStorageTables.UnitTest --no-build --configuration release --verbosity normal
# env:
# AUDIT_NET_AZURETABLECNNSTRING: ${{ secrets.AUDIT_NET_AZURETABLECNNSTRING }}
- name: Test Audit.EntityFramework.Core.v3.UnitTest
run: dotnet test .\test\Audit.EntityFramework.Core.v3.UnitTest --no-build --configuration release --verbosity normal
- name: Test Audit.EntityFramework.Full.UnitTest
run: dotnet test .\test\Audit.EntityFramework.Full.UnitTest --no-build --configuration release --verbosity normal
- name: Test Audit.Mvc.UnitTest
run: dotnet test .\test\Audit.Mvc.UnitTest --no-build --configuration release --verbosity normal
- name: Test Audit.JsonAdapter.UnitTest
run: dotnet test .\test\Audit.JsonAdapter.UnitTest --no-build --configuration release --verbosity normal
- name: Test Audit.WebApi.UnitTest
run: dotnet test .\test\Audit.WebApi.UnitTest --no-build --configuration release --verbosity normal
- name: Test Audit.DynamicProxy.UnitTest
run: dotnet test .\test\Audit.DynamicProxy.UnitTest --no-build --configuration release --verbosity normal
- name: Test Audit.Wcf.UnitTest
run: dotnet test .\test\Audit.Wcf.UnitTest --no-build --configuration release --verbosity normal
- name: Test Audit.UnitTest
run: dotnet test .\test\Audit.UnitTest --no-build --configuration release --verbosity normal