-
-
Notifications
You must be signed in to change notification settings - Fork 65
58 lines (48 loc) · 1.92 KB
/
dotnet-windows.yml
File metadata and controls
58 lines (48 loc) · 1.92 KB
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
name: .NET Tests / Windows
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
dotnet-windows:
name: Tests
runs-on: windows-latest
defaults:
run:
shell: pwsh
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- name: Install LocalDB
run: |
choco install sqllocaldb -y --no-progress
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # need for GitVersion to work properly
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Patch App.config for LocalDB
run: |
$cfg = 'src/DelegateDecompiler.EntityFramework.Tests/App.config'
[xml]$xml = Get-Content $cfg
$cs = $xml.configuration.connectionStrings.add | Where-Object name -eq 'DelegateDecompilerEfTestDb'
$cs.connectionString = 'Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=DelegateDecompilerEfTestDb;MultipleActiveResultSets=True;Integrated Security=True;TrustServerCertificate=True'
$xml.Save($cfg)
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release DelegateDecompiler.sln
- name: Run tests
run: |
dotnet test --no-build -c Release -f net8.0 src/DelegateDecompiler.Tests
dotnet test --no-build -c Release -f net8.0 src/DelegateDecompiler.Tests.VB
dotnet test --no-build -c Release -f net8.0 src/DelegateDecompiler.EntityFramework.Tests
dotnet test --no-build -c Release -f net8.0 src/DelegateDecompiler.EntityFrameworkCore6.Tests
dotnet test --no-build -c Release -f net8.0 src/DelegateDecompiler.EntityFrameworkCore8.Tests
dotnet test --no-build -c Release -f net9.0 src/DelegateDecompiler.EntityFrameworkCore9.Tests