-
-
Notifications
You must be signed in to change notification settings - Fork 19
34 lines (30 loc) · 1.13 KB
/
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
name: run unit tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
config: 'Release'
steps:
- uses: actions/checkout@v2
- name: Setup .NET5
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.*
- name: Install dependencies
run: dotnet restore --verbosity normal
- name: Build
run: dotnet build --configuration $config --no-restore
- name: Test
run: dotnet test --configuration $config --no-restore --no-build --verbosity normal --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=lcov
- name: Find lcov file path
id: find-lcov-file-path
shell: pwsh
run: |
$FilePath = (Get-ChildItem CompressedStaticFiles.Tests\TestResults\* | Select-Object -First 1 | Get-ChildItem).FullName
Write-Host ::set-output name=path::$FilePath
- name: Publish coverage report to coveralls.io
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ${{ steps.find-lcov-file-path.outputs.path }}