Skip to content

Commit 400f4fe

Browse files
authored
ci: Fix CI not failing on test error (#398)
1 parent 39de67d commit 400f4fe

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/ci.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
fail-fast: false
1616
name: .NET ${{ matrix.DOTNET_VERSION }}
1717
runs-on: windows-latest
18+
timeout-minutes: 30
1819
steps:
1920
- name: Checkout repository
2021
uses: actions/checkout@v4
@@ -38,10 +39,10 @@ jobs:
3839
with:
3940
args: 'install opencover.portable codecov -y'
4041
- name: Build
41-
run: dotnet build Parse.sln --configuration Debug --no-restore
42+
run: dotnet build Parse.sln --configuration Debug --no-restore /p:DebugType=full /p:GenerateFullPaths=true /p:CollectCoverage=false
4243
- name: Run tests with coverage
4344
run: |
44-
OpenCover.Console.exe -target:dotnet.exe -targetargs:"test --framework net${{ matrix.DOTNET_VERSION }} --configuration Debug --test-adapter-path:. --logger:console /p:DebugType=full .\Parse.Tests\Parse.Tests.csproj" -filter:"+[Parse*]* -[Parse.Tests*]*" -oldstyle -output:parse_sdk_dotnet_coverage.xml -register:user
45+
OpenCover.Console.exe -returntargetcode -target:dotnet.exe -targetargs:"test --framework net${{ matrix.DOTNET_VERSION }} --configuration Debug --test-adapter-path:. --logger:console /p:DebugType=full .\Parse.Tests\Parse.Tests.csproj" -filter:"+[Parse*]* -[Parse.Tests*]*" -oldstyle -output:parse_sdk_dotnet_coverage.xml -register:user
4546
- name: Upload code coverage
4647
uses: codecov/codecov-action@v4
4748
with:

Parse.Tests/Parse.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net6.0</TargetFramework>
3+
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
44
<IsPackable>false</IsPackable>
55
<LangVersion>latest</LangVersion>
66
</PropertyGroup>

0 commit comments

Comments
 (0)