-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
102 lines (86 loc) · 3.12 KB
/
wf-build-test.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
name: Build, test (Pull Request)
on:
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: windows-2019
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- uses: actions/checkout@v4
name: Checkout Code
- name: Install additional .NET SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
1.0.x
2.0.x
5.0.x
6.0.x
8.0.x
- name: Restore NuGet Packages
run: dotnet restore
- name: Build library
run: dotnet build -c Release --no-restore
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder
test:
needs: build
runs-on: windows-2019
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder
- name: Install additional .NET SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
1.0.x
2.0.x
5.0.x
6.0.x
8.0.x
- name: Run test .NET 3.5
working-directory: QRCoderTests
run: dotnet test -c Release -f net35 --nologo --no-build # No coverage for NET3.5 because of bug in combination with Coverlet+Stronh naming
- name: Run test .NET 4.52
working-directory: QRCoderTests
run: dotnet test -c Release -f net452 --nologo --no-build # No coverage for NET4.5 because of bug in combination with Coverlet+Strong naming
- name: Run test .NET Core 1.1
working-directory: QRCoderTests
run: dotnet test -c Release -f netcoreapp1.1 --nologo # No coverage for .NETCORE 1.1 because Coverlet doesn't support it https://github.com/coverlet-coverage/coverlet/issues/466
- name: Run test .NET Core 2.0
working-directory: QRCoderTests
run: dotnet test -c Release -f netcoreapp2.0 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: Run test .NET 5.0
working-directory: QRCoderTests
run: dotnet test -c Release -f net5.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: Run test .NET 5.0 Windows
working-directory: QRCoderTests
run: dotnet test -c Release -f net5.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: Run test .NET 6.0
working-directory: QRCoderTests
run: dotnet test -c Release -f net6.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: Run test .NET 6.0 Windows
working-directory: QRCoderTests
run: dotnet test -c Release -f net6.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: Run API approval tests
working-directory: QRCoderApiTests
run: dotnet test -c Release --nologo --no-build
clean:
needs: [build, test]
if: always()
runs-on: windows-2019
steps:
- name: Delete artifacts
uses: GeekyEggo/delete-artifact@v5
with:
name: Compiled project