Skip to content

Commit b26b336

Browse files
author
MPCoreDeveloper
committed
CI / CD nu goed ?
1 parent 27504c2 commit b26b336

File tree

4 files changed

+35
-11
lines changed

4 files changed

+35
-11
lines changed

SharpCoreDB/.github/workflows/ci.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,47 @@ name: CI
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ master ]
66
pull_request:
7-
branches: [ main ]
7+
branches: [ master ]
88

99
jobs:
10-
build:
10+
build-and-test:
1111
runs-on: ubuntu-latest
12+
timeout-minutes: 15
1213

1314
steps:
1415
- uses: actions/checkout@v4
16+
1517
- name: Setup .NET
1618
uses: actions/setup-dotnet@v4
1719
with:
18-
dotnet-version: 10.0.x
20+
dotnet-version: '10.0.x'
21+
include-prerelease: true
22+
1923
- name: Restore dependencies
2024
run: dotnet restore
25+
2126
- name: Build
22-
run: dotnet build --no-restore
23-
- name: Test
24-
run: dotnet test --no-build --verbosity normal
27+
run: dotnet build --no-restore --configuration Release
28+
29+
- name: Test with detailed logging
30+
id: test
31+
continue-on-error: true # zodat we altijd artifacts krijgen
32+
run: |
33+
dotnet test --no-build --configuration Release \
34+
--logger "trx;LogFileName=TestResults.trx" \
35+
--logger "console;verbosity=detailed" \
36+
--collect:"XPlat Code Coverage" \
37+
--results-directory ./TestResults \
38+
--blame-hang-timeout 2m \
39+
/p:CollectCoverage=true
40+
41+
- name: Upload test results (always)
42+
if: always()
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: test-results-trx
46+
path: |
47+
**/TestResults/*.trx
48+
**/*.coverage

SharpCoreDB/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
<ItemGroup>
77
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" PrivateAssets="All" />
88
</ItemGroup>
9-
</Project>
9+
</Project>

SharpCoreDB/SharpCoreDB.Tests/SharpCoreDB.Tests.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<IsPackable>false</IsPackable>
8-
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
98
</PropertyGroup>
109
<ItemGroup>
1110
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
@@ -15,6 +14,6 @@
1514
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
1615
</ItemGroup>
1716
<ItemGroup>
18-
<ProjectReference Include="..\SharpCoreDB.Core\SharpCoreDB.Core.csproj" />
17+
<ProjectReference Include="..\SharpCoreDB\SharpCoreDB.csproj" />
1918
</ItemGroup>
2019
</Project>

SharpCoreDB/SharpCoreDB.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
</ItemGroup>
3737

3838
<ItemGroup>
39-
<Compile Include="**/*.cs" Exclude="SharpCoreDB.Test/**" />
39+
<Compile Include="**/*.cs" Exclude="SharpCoreDB.Test/**;obj/**" />
40+
<Compile Remove="obj/**/*.cs" />
4041
</ItemGroup>
4142

4243
<ItemGroup>

0 commit comments

Comments
 (0)