-
Notifications
You must be signed in to change notification settings - Fork 31
179 lines (157 loc) · 5.84 KB
/
gate.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
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
name: Build
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
win:
runs-on: windows-latest
permissions:
checks: write
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
6.0.x
8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test (4.8)
run: dotnet test --no-restore --verbosity normal -f net48 --logger "trx;LogFileName=results4.trx"
- name: Upload test results (4.8)
uses: actions/upload-artifact@v4 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results-win48
path: BitFaster.Caching.UnitTests/TestResults/results4.trx
- name: Test (3.1)
run: dotnet test --no-restore --verbosity normal -f netcoreapp3.1 /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=lcov --logger "trx;LogFileName=results3.trx"
- name: Upload test results (3.1)
uses: actions/upload-artifact@v4 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results-win3
path: BitFaster.Caching.UnitTests/TestResults/results3.trx
- name: Publish coverage report to coveralls.io (3.1)
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: BitFaster.Caching.UnitTests/TestResults/coverage.netcoreapp3.1.info
flag-name: win3
parallel: true
- name: Test (6.0)
run: dotnet test --no-restore --verbosity normal -f net6.0 /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=lcov --logger "trx;LogFileName=results6.trx"
- name: Upload test results (6.0)
uses: actions/upload-artifact@v4 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results-win6
path: BitFaster.Caching.UnitTests/TestResults/results6.trx
- name: Upload test results (6.0 .NET Std)
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results-win6-std
path: BitFaster.Caching.UnitTests.Std/TestResults/results6.trx
- name: Publish coverage report to coveralls.io (6.0)
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: BitFaster.Caching.UnitTests/TestResults/coverage.net6.0.info
flag-name: win6
parallel: true
- name: Publish NuGet artifacts
uses: actions/upload-artifact@v4
with:
name: NuGet package
path: BitFaster.Caching/bin/Release/
mac:
runs-on: macos-latest
permissions:
checks: write
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal -f net6.0 /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=lcov --logger "trx;LogFileName=results.trx"
- name: Publish coverage report to coveralls.io
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: BitFaster.Caching.UnitTests/TestResults/coverage.net6.0.info
flag-name: mac
parallel: true
- name: Upload test results (6.0)
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results-mac
path: BitFaster.Caching.UnitTests/TestResults/results.trx
- name: Upload test results (6.0 .NET Std)
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results-mac-std
path: BitFaster.Caching.UnitTests.Std/TestResults/results.trx
linux:
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal -f net6.0 /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=lcov --logger "trx;LogFileName=results.trx"
- name: Publish coverage report to coveralls.io
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: BitFaster.Caching.UnitTests/TestResults/coverage.net6.0.info
flag-name: linux
parallel: true
- name: Upload test results (6.0)
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results-linux
path: BitFaster.Caching.UnitTests/TestResults/results.trx
- name: Upload test results (6.0 .NET Std)
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results-linux-std
path: BitFaster.Caching.UnitTests.Std/TestResults/results.trx
coverage:
needs: [win, mac, linux]
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true