-
Notifications
You must be signed in to change notification settings - Fork 37
131 lines (107 loc) · 4.09 KB
/
Copy pathregression.yml
File metadata and controls
131 lines (107 loc) · 4.09 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
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Regression Tests
# https://dotnet.microsoft.com/download/dotnet-core
# https://dotnet.microsoft.com/download/dotnet-framework
on:
[ push, pull_request ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache
id: unity-abstractions
uses: actions/cache@v1
with:
path: '${{ github.workspace }}/package'
key: ${{ github.sha }}
- name: Build Package
env:
PackageVersion: '0.0.0'
PackageOutputPath: '${{ github.workspace }}/package'
run: dotnet msbuild -property:Configuration=Release -verbosity:m -restore:True src
net:
needs: [ Build ]
strategy:
matrix:
framework: ['net48', 'net47', 'net46', 'net45']
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache
id: unity-abstractions
uses: actions/cache@v1
with:
path: '${{ github.workspace }}/package'
key: ${{ github.sha }}
- name: Build Package
env:
TargetFramework: ${{ matrix.framework }}
run: |
dotnet remove ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj reference "..\src\Unity.Abstractions.csproj"
dotnet add ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj package --source '${{ github.workspace }}/package' Unity.Abstractions --version 0.0.0
dotnet msbuild -property:Configuration=Release -verbosity:m -restore:True ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj
- name: Test
env:
TargetFramework: ${{ matrix.framework }}
run: dotnet test ${{ github.workspace }}/tests/bin/Release/${{ matrix.framework }}/Unity.Abstractions.Tests.dll
core-lts-2:
needs: [ Build ]
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
TargetFramework: netcoreapp2.1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install DotNet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '2.1.806'
- name: Install Nuget
uses: nuget/setup-nuget@v1
- name: Cache
id: unity-abstractions
uses: actions/cache@v1
with:
path: '${{ github.workspace }}/package'
key: ${{ github.sha }}
- name: Build Package
run: |
nuget add ${{ github.workspace }}/package/Unity.Abstractions.0.0.0.nupkg -Source packages
dotnet remove ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj reference "..\src\Unity.Abstractions.csproj"
dotnet add ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj package --source packages Unity.Abstractions --version 0.0.0
dotnet msbuild -property:Configuration=Release -verbosity:m -restore:True ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj
- name: Test
run: dotnet vstest ${{ github.workspace }}/tests/bin/Release/netcoreapp2.1/Unity.Abstractions.Tests.dll
core-lts-3:
needs: [ Build ]
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
TargetFramework: netcoreapp3.1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install DotNet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.202'
- name: Cache
id: unity-abstractions
uses: actions/cache@v1
with:
path: '${{ github.workspace }}/package'
key: ${{ github.sha }}
- name: Build Package
run: |
dotnet remove ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj reference "..\src\Unity.Abstractions.csproj"
dotnet add ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj package --source '${{ github.workspace }}/package' Unity.Abstractions --version 0.0.0
dotnet msbuild -property:Configuration=Release -verbosity:m -restore:True ${{ github.workspace }}/tests/Unity.Abstractions.Tests.csproj
- name: Test
run: dotnet vstest ${{ github.workspace }}/tests/bin/Release/netcoreapp3.1/Unity.Abstractions.Tests.dll