Skip to content

Commit 9223f39

Browse files
author
Alex J Lennon
committed
CI: Restore only test project to preserve xunit in assets
Restore only the test project (not the main project separately). The test project restore will also restore the main project as a dependency, but the shared assets file will include xunit. Restoring the main project separately overwrites the assets file and removes xunit. Tested locally - all 92 tests pass.
1 parent dab4720 commit 9223f39

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ jobs:
3030
run: rm -rf obj bin
3131

3232
- name: Restore dependencies (explicit xunit)
33-
run: dotnet restore InstDotNet.sln
33+
run: |
34+
# Restore test project - this also restores main project as dependency
35+
# and ensures xunit is in the shared assets file
36+
dotnet restore tests/InstDotNet.Tests.csproj
3437
3538
- name: Run Tests
3639
run: dotnet test tests/InstDotNet.Tests.csproj -c Release -p:GitCommitHash=${{ steps.git.outputs.hash }} --no-restore --verbosity normal

0 commit comments

Comments
 (0)