-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
61 lines (50 loc) · 1.96 KB
/
Copy pathwf-build-test.yml
File metadata and controls
61 lines (50 loc) · 1.96 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
59
60
61
name: Build, test (Pull Request)
on:
pull_request:
branches:
- master
concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
test:
name: Test ${{ matrix.dotnet-framework.name }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
dotnet-framework:
- { name: ".NET Framework 4.6.2", framework: "net462", coverage: false, no-build: true, sdk: "" }
- { name: ".NET Core 2.1", framework: "netcoreapp2.1", coverage: true, no-build: false, sdk: "2.1.x" }
- { name: ".NET Core 3.1", framework: "netcoreapp3.1", coverage: true, no-build: true, sdk: "3.1.x" }
- { name: ".NET 5.0 Windows", framework: "net5.0-windows", coverage: true, no-build: true, sdk: "5.0.x" }
- { name: ".NET 6.0 Windows", framework: "net6.0-windows", coverage: true, no-build: true, sdk: "6.0.x" }
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install .NET SDK ${{ matrix.dotnet-framework.sdk }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
${{ matrix.dotnet-framework.sdk }}
8.0.x
- name: Run tests for ${{ matrix.dotnet-framework.name }}
working-directory: QRCoderTests
run: dotnet test -c Debug -f ${{ matrix.dotnet-framework.framework }} --nologo -p:CollectCoverage=${{ matrix.dotnet-framework.coverage }} -p:CoverletOutputFormat=opencover
additional-tests:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Run trim analysis
working-directory: QRCoderTrimAnalysis
run: dotnet publish -c Release -o bin/publish
- name: Build solution
run: dotnet build -c Release
- name: Run API approval tests
working-directory: QRCoderApiTests
run: dotnet test -c Release --nologo