Skip to content

Commit d982373

Browse files
committed
Use traversal project in CI. Ensure formatting is verified on linux and windows
1 parent 46c5d53 commit d982373

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

.ci/gha-run-tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ Write-Host "[INFO] Setting RABBITMQ_RABBITMQCTL_PATH to '$rabbitmqctl_path'..."
2828
$env:RABBITMQ_RABBITMQCTL_PATH = $rabbitmqctl_path
2929
[Environment]::SetEnvironmentVariable('RABBITMQ_RABBITMQCTL_PATH', $rabbitmqctl_path, 'Machine')
3030

31-
$solution_file = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath 'RabbitMQDotNetClient.sln'
32-
dotnet test --no-restore --no-build --logger "console;verbosity=detailed" $solution_file
31+
$build_csproj_file = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath 'Build.csproj'
32+
dotnet test $build_csproj_file --no-restore --no-build --logger "console;verbosity=detailed"

.github/workflows/main.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ jobs:
4242
- name: List NuGet sources
4343
run: dotnet nuget locals all --list
4444
- name: Restore
45-
run: dotnet restore --verbosity=normal
45+
run: dotnet restore ./Build.csproj --verbosity=normal
4646
- name: Build
47-
run: dotnet build --no-restore --verbosity=normal
47+
run: dotnet build ./Build.csproj --no-restore --verbosity=normal
48+
- name: Verify
49+
run: dotnet format ./RabbitMQDotNetClient.sln --no-restore --verbosity=diagnostic --verify-no-changes
4850
- name: Test
4951
run: ./.ci/gha-run-tests.ps1
5052

@@ -79,12 +81,12 @@ jobs:
7981
restore-keys: |
8082
${{ runner.os }}-v0-nuget-
8183
- name: Restore
82-
run: dotnet restore --verbosity=normal
84+
run: dotnet restore ./Build.csproj --verbosity=normal
8385
- name: Build
84-
run: dotnet build --no-restore --verbosity=normal
86+
run: dotnet build ./Build.csproj --no-restore --verbosity=normal
87+
- name: Verify
88+
run: dotnet format ./RabbitMQDotNetClient.sln --no-restore --verbosity=diagnostic --verify-no-changes
8589
- name: Test
86-
run: dotnet test --no-restore --no-build --logger "console;verbosity=detailed" --framework "net6.0"
90+
run: dotnet test ./Build.csproj --no-restore --no-build --logger "console;verbosity=detailed" --framework "net6.0"
8791
env:
8892
RABBITMQ_RABBITMQCTL_PATH: DOCKER:${{job.services.rabbitmq.id}}
89-
- name: Verify Formatting
90-
run: dotnet format --verbosity normal --no-restore --verify-no-changes

0 commit comments

Comments
 (0)