-
Notifications
You must be signed in to change notification settings - Fork 185
100 lines (78 loc) · 2.83 KB
/
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
name: BuildAndTestFunctions
on:
push:
pull_request:
branches:
- master
jobs:
build-test-nix:
name: Build and test .NET Core
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # we want to see list of failing tests for each combination
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
framework: ['netcoreapp3.1', 'net5.0', 'net8.0']
exclude:
- os: macos-latest
framework: 'netcoreapp3.1'
- os: macos-latest
framework: 'net5.0'
- os: macos-latest
framework: 'net8.0'
steps:
- name: Check out code onto host
uses: actions/checkout@v1
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
5.0.x
8.0.x
- name: Dotnet info
run: |
dotnet --version
dotnet --info
- name: Clear nuget cache
# Workaround for https://github.com/actions/setup-dotnet/issues/155
run: |
dotnet clean jose-jwt.sln
dotnet nuget locals all --clear
- name: Run unit tests
run: |
dotnet test jose-jwt.sln --framework=${{ matrix.framework }}
build-test-netfx:
name: Build and test .NET Framework
runs-on: [windows-2019]
strategy:
fail-fast: false # we want to see list of failing tests for each combination
matrix:
framework: ['net40', 'net46', 'net47']
steps:
- name: Check out code onto host
uses: actions/checkout@v3
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Setup NuGet
uses: nuget/setup-nuget@v1
with:
nuget-version: '6.x'
- name: Nuget Restore jose-jwt-${{ matrix.framework }}
continue-on-error: true
run: nuget restore jose-jwt-${{ matrix.framework }}.sln
- name: MSBuild jose-jwt-${{ matrix.framework }}
continue-on-error: true
run: msbuild jose-jwt-${{ matrix.framework }}.sln /t:rebuild /v:detailed /p:Configuration=Release
# - name: Install NUnit.ConsoleRunner
# if: matrix.framework == 'net40'
# run: nuget install NUnit.ConsoleRunner -Version 3.15.0 -DirectDownload -OutputDirectory .
# - name: Run UnitTestsNet40
# if: matrix.framework == 'net40'
# run: .\NUnit.ConsoleRunner.3.15.0\tools\nunit3-console.exe UnitTestsNet40\bin\Release\UnitTestsNet40.dll
- name: Install xunit.runner.console
if: ${{ matrix.framework == 'net46' || matrix.framework == 'net47' }}
run: nuget install xunit.runner.console -Version 2.2.0-beta4-build3444 -DirectDownload -OutputDirectory .
- name: Run UnitTestsNet46
if: ${{ matrix.framework == 'net46' || matrix.framework == 'net47' }}
run: .\xunit.runner.console.2.2.0-beta4-build3444\tools\xunit.console.exe UnitTestsNet46\bin\Release\UnitTestsNet46.dll