Skip to content

Commit c059832

Browse files
Merge pull request #1217 from icsharpcode/split-tests
Run tests twice in parallel
2 parents 4ed4261 + 52f12b8 commit c059832

File tree

3 files changed

+55
-6
lines changed

3 files changed

+55
-6
lines changed

.github/workflows/dotnet-tests.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: .NET Tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
runs-on:
7+
required: true
8+
type: string
9+
vs-version:
10+
required: true
11+
type: string
12+
dotnet-version:
13+
required: true
14+
type: string
15+
16+
jobs:
17+
test:
18+
runs-on: ${{ inputs.runs-on }}
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup .NET
24+
uses: actions/setup-dotnet@v4
25+
with:
26+
dotnet-version: ${{ inputs.dotnet-version }}
27+
28+
- name: Add msbuild to PATH
29+
uses: microsoft/setup-msbuild@v2
30+
with:
31+
vs-version: ${{ inputs.vs-version }}
32+
33+
- name: Log MSBuild version
34+
run: msbuild -version
35+
36+
- name: Build
37+
run: dotnet build DotNetBuildable.slnf /p:Configuration=Release
38+
39+
- name: Execute unit tests
40+
run: dotnet test Tests/bin/Release/ICSharpCode.CodeConverter.Tests.dll

.github/workflows/dotnet.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ jobs:
4646
- name: MSBuild Vsix
4747
run: msbuild Vsix\Vsix.csproj -restore /p:Configuration=$env:BuildTarget
4848

49-
- name: Execute unit tests
50-
run: dotnet test $env:Tests1
51-
env:
52-
Tests1: Tests/bin/${{ env.BuildTarget }}/ICSharpCode.CodeConverter.Tests.dll
53-
5449
- name: Run vitest
5550
working-directory: Web
5651
run: npm test -- --run
@@ -80,4 +75,17 @@ jobs:
8075
with:
8176
name: ICSharpCode.CodeConverter.Func.${{ env.BuildVersion }}.zip
8277
path: Func/bin/${{ env.BuildTarget }}/publish/
83-
78+
79+
test-vs2022:
80+
uses: ./.github/workflows/dotnet-tests.yml
81+
with:
82+
runs-on: windows-2022
83+
vs-version: '[17.0,18.0)'
84+
dotnet-version: 8.0.x
85+
86+
test-vs2026:
87+
uses: ./.github/workflows/dotnet-tests.yml
88+
with:
89+
runs-on: windows-2025-vs2026
90+
vs-version: '[18.0,)'
91+
dotnet-version: 10.0.x

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,3 +289,4 @@ __pycache__/
289289
/.nuget
290290
/web/.vite/
291291
/web/dist/
292+
.claude/settings.local.json

0 commit comments

Comments
 (0)