-
-
Notifications
You must be signed in to change notification settings - Fork 7
78 lines (65 loc) · 3.39 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
name: build-and-test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.x
8.x
- name: Unit tests
run: dotnet test -c Release
- name: Create local packages
run: |
dotnet pack -c Release -o packages src/Serilog.Sinks.InMemory/Serilog.Sinks.InMemory.csproj
dotnet pack -c Release -o packages src/Serilog.Sinks.InMemory.Assertions/Serilog.Sinks.InMemory.Assertions.csproj
- name: Get the version
id: get_version
uses: mavrosxristoforos/[email protected]
with:
xml-file: './Directory.Build.props'
xpath: '//Version'
- name: Create short version
id: shortversion
run: |
$version = "${{ steps.get_version.outputs.info }}".Substring(0, "${{ steps.get_version.outputs.info }}".LastIndexOf("."))
Write-Host "::set-output name=shortversion::$version"
shell: pwsh
- name: Run integration tests for FluentAssertions 5
working-directory: test/Serilog.Sinks.InMemory.Assertions.Tests.Integration.FluentAssertions5
run: |
dotnet restore -p:Version=${{ steps.shortversion.outputs.shortversion }}
dotnet test --no-restore -c Release Serilog.Sinks.InMemory.Assertions.Tests.Integration.FluentAssertions5.csproj
- name: Run integration tests for FluentAssertions 6
working-directory: test/Serilog.Sinks.InMemory.Assertions.Tests.Integration.FluentAssertions6
run: |
dotnet restore -p:Version=${{ steps.shortversion.outputs.shortversion }}
dotnet test --no-restore -c Release Serilog.Sinks.InMemory.Assertions.Tests.Integration.FluentAssertions6.csproj
- name: Run integration tests for FluentAssertions 7
working-directory: test/Serilog.Sinks.InMemory.Assertions.Tests.Integration.FluentAssertions7
run: |
dotnet restore -p:Version=${{ steps.shortversion.outputs.shortversion }}
dotnet test --no-restore -c Release Serilog.Sinks.InMemory.Assertions.Tests.Integration.FluentAssertions7.csproj
- name: Run integration tests for FluentAssertions 8
working-directory: test/Serilog.Sinks.InMemory.Assertions.Tests.Integration.FluentAssertions8
run: |
dotnet restore -p:Version=${{ steps.shortversion.outputs.shortversion }}
dotnet test --no-restore -c Release Serilog.Sinks.InMemory.Assertions.Tests.Integration.FluentAssertions8.csproj
- name: Run integration tests for AwesomeAssertions 8
working-directory: test/Serilog.Sinks.InMemory.Assertions.Tests.Integration.AwesomeAssertions8
run: |
dotnet restore -p:Version=${{ steps.shortversion.outputs.shortversion }}
dotnet test --no-restore -c Release Serilog.Sinks.InMemory.Assertions.Tests.Integration.AwesomeAssertions8.csproj
- name: Run integration tests for Shouldly 4.x
working-directory: test/Serilog.Sinks.InMemory.Assertions.Tests.Integration.Shouldly4
run: |
dotnet restore -p:Version=${{ steps.shortversion.outputs.shortversion }}
dotnet test --no-restore -c Release Serilog.Sinks.InMemory.Assertions.Tests.Integration.Shouldly4.csproj