Fixed bug #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |