Skip to content

Commit 866d8b2

Browse files
authored
Run tests on Linux (#492)
1 parent 9e84a80 commit 866d8b2

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

.github/workflows/gate.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches: [ main ]
67
pull_request:
@@ -119,9 +120,45 @@ jobs:
119120
reporter: dotnet-trx
120121
only-summary: 'true'
121122

123+
linux:
124+
125+
runs-on: ubuntu-latest
126+
127+
permissions:
128+
checks: write
129+
130+
steps:
131+
- uses: actions/checkout@v3
132+
- name: Setup .NET Core
133+
uses: actions/setup-dotnet@v2
134+
with:
135+
dotnet-version: 6.0.x
136+
- name: Install dependencies
137+
run: dotnet restore
138+
- name: Build
139+
run: dotnet build --configuration Release --no-restore
140+
- name: Test
141+
run: dotnet test --no-restore --verbosity normal -f net6.0 /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=lcov --logger "trx;LogFileName=results.trx"
142+
- name: Publish coverage report to coveralls.io
143+
uses: coverallsapp/github-action@master
144+
with:
145+
github-token: ${{ secrets.GITHUB_TOKEN }}
146+
path-to-lcov: BitFaster.Caching.UnitTests/TestResults/coverage.net6.0.info
147+
flag-name: linux
148+
parallel: true
149+
- name: Generate unit test report
150+
uses: phoenix-actions/test-reporting@v12
151+
id: unit-test-report-linux
152+
if: success() || failure()
153+
with:
154+
name: test results (linux net6.0)
155+
path: BitFaster.Caching.UnitTests/TestResults/results.trx
156+
reporter: dotnet-trx
157+
only-summary: 'true'
158+
122159
coverage:
123160

124-
needs: [win, mac]
161+
needs: [win, mac, linux]
125162

126163
runs-on: ubuntu-latest
127164

0 commit comments

Comments
 (0)