From a28515b2e756df8981d94d796d7341cb7b8aac67 Mon Sep 17 00:00:00 2001 From: jbe2277 Date: Thu, 31 Oct 2024 21:38:23 +0100 Subject: [PATCH 1/7] Test: Add GitHubActions logger for unit tests --- .github/workflows/System.Waf.CI.yml | 2 +- src/System.Waf/Directory.Build.props | 6 ++---- src/System.Waf/Directory.Packages.props | 13 +++++++------ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/System.Waf.CI.yml b/.github/workflows/System.Waf.CI.yml index b7697a84..8dbb7052 100644 --- a/.github/workflows/System.Waf.CI.yml +++ b/.github/workflows/System.Waf.CI.yml @@ -27,7 +27,7 @@ jobs: run: dotnet build ./src/System.Waf/System.Waf.sln -c Release -p:ContinuousIntegrationBuild=true - name: 🕵️ Test - run: dotnet test ./src/System.Waf/System.Waf.sln -c Release --no-build + run: dotnet test ./src/System.Waf/System.Waf.sln -c Release --no-build --logger GitHubActions - name: 📦 Upload NuGet Packages uses: actions/upload-artifact@v4 diff --git a/src/System.Waf/Directory.Build.props b/src/System.Waf/Directory.Build.props index ec7dda43..2ca98af6 100644 --- a/src/System.Waf/Directory.Build.props +++ b/src/System.Waf/Directory.Build.props @@ -11,10 +11,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -24,6 +21,7 @@ $(MSBuildThisFileDirectory)CodeCoverage.runsettings + diff --git a/src/System.Waf/Directory.Packages.props b/src/System.Waf/Directory.Packages.props index eae4432f..5208030f 100644 --- a/src/System.Waf/Directory.Packages.props +++ b/src/System.Waf/Directory.Packages.props @@ -2,16 +2,16 @@ true - + - + - + - + @@ -19,10 +19,11 @@ - + + - + \ No newline at end of file From d153b9ac1e8813f823ec1f08073473ba44725bc7 Mon Sep 17 00:00:00 2001 From: jbe2277 Date: Fri, 1 Nov 2024 19:23:13 +0100 Subject: [PATCH 2/7] UITest: Add GitHubActions logger for UI tests --- .github/workflows/System.Waf.CI.yml | 2 +- src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj | 1 + .../InformationManager.Test/InformationManager.Test.csproj | 1 + src/Samples.UITest/Writer.Test/Writer.Test.csproj | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/System.Waf.CI.yml b/.github/workflows/System.Waf.CI.yml index 8dbb7052..0118e761 100644 --- a/.github/workflows/System.Waf.CI.yml +++ b/.github/workflows/System.Waf.CI.yml @@ -39,7 +39,7 @@ jobs: src/System.Waf/System.Waf/**/*.snupkg - name: 🖥️ UI Test - run: dotnet test ./src/Samples.UITest/Samples.UITest.sln --logger "console;verbosity=detailed" -maxCpuCount:1 + run: dotnet test ./src/Samples.UITest/Samples.UITest.sln --logger GitHubActions -maxCpuCount:1 - name: 📦 Upload UI Test results uses: actions/upload-artifact@v4 diff --git a/src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj b/src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj index 43bba286..464d2c97 100644 --- a/src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj +++ b/src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj @@ -8,6 +8,7 @@ + diff --git a/src/Samples.UITest/InformationManager.Test/InformationManager.Test.csproj b/src/Samples.UITest/InformationManager.Test/InformationManager.Test.csproj index 886af137..a8de5973 100644 --- a/src/Samples.UITest/InformationManager.Test/InformationManager.Test.csproj +++ b/src/Samples.UITest/InformationManager.Test/InformationManager.Test.csproj @@ -8,6 +8,7 @@ + diff --git a/src/Samples.UITest/Writer.Test/Writer.Test.csproj b/src/Samples.UITest/Writer.Test/Writer.Test.csproj index 438af642..0af6cea9 100644 --- a/src/Samples.UITest/Writer.Test/Writer.Test.csproj +++ b/src/Samples.UITest/Writer.Test/Writer.Test.csproj @@ -8,6 +8,7 @@ + From 013bc27d7ebe58b76ce43ec04db733d32b3d1dac Mon Sep 17 00:00:00 2001 From: jbe2277 Date: Fri, 1 Nov 2024 19:58:43 +0100 Subject: [PATCH 3/7] UITest: use ManagePackageVersionsCentrally --- .github/workflows/System.Waf.CI.yml | 8 ++++++-- .../BookLibrary.Test/BookLibrary.Test.csproj | 8 ++++---- src/Samples.UITest/Directory.Packages.props | 14 ++++++++++++++ .../InformationManager.Test.csproj | 8 ++++---- src/Samples.UITest/Samples.UITest.sln | 7 ++++++- src/Samples.UITest/UITest.Core/UITest.Core.csproj | 4 ++-- src/Samples.UITest/Writer.Test/Writer.Test.csproj | 8 ++++---- 7 files changed, 40 insertions(+), 17 deletions(-) create mode 100644 src/Samples.UITest/Directory.Packages.props diff --git a/.github/workflows/System.Waf.CI.yml b/.github/workflows/System.Waf.CI.yml index 0118e761..4ca9875a 100644 --- a/.github/workflows/System.Waf.CI.yml +++ b/.github/workflows/System.Waf.CI.yml @@ -27,7 +27,9 @@ jobs: run: dotnet build ./src/System.Waf/System.Waf.sln -c Release -p:ContinuousIntegrationBuild=true - name: 🕵️ Test - run: dotnet test ./src/System.Waf/System.Waf.sln -c Release --no-build --logger GitHubActions + run: | + echo "##🕵️ Test Results - System.Waf.sln" >> $GITHUB_STEP_SUMMARY + dotnet test ./src/System.Waf/System.Waf.sln -c Release --no-build --logger GitHubActions - name: 📦 Upload NuGet Packages uses: actions/upload-artifact@v4 @@ -39,7 +41,9 @@ jobs: src/System.Waf/System.Waf/**/*.snupkg - name: 🖥️ UI Test - run: dotnet test ./src/Samples.UITest/Samples.UITest.sln --logger GitHubActions -maxCpuCount:1 + run: | + echo "##🕵️ Test Results - Samples.UITest.sln" >> $GITHUB_STEP_SUMMARY + dotnet test ./src/Samples.UITest/Samples.UITest.sln --logger GitHubActions -maxCpuCount:1 - name: 📦 Upload UI Test results uses: actions/upload-artifact@v4 diff --git a/src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj b/src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj index 464d2c97..a29fe908 100644 --- a/src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj +++ b/src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj @@ -8,10 +8,10 @@ - - - - + + + + diff --git a/src/Samples.UITest/Directory.Packages.props b/src/Samples.UITest/Directory.Packages.props new file mode 100644 index 00000000..51df380d --- /dev/null +++ b/src/Samples.UITest/Directory.Packages.props @@ -0,0 +1,14 @@ + + + true + + + + + + + + + + + \ No newline at end of file diff --git a/src/Samples.UITest/InformationManager.Test/InformationManager.Test.csproj b/src/Samples.UITest/InformationManager.Test/InformationManager.Test.csproj index a8de5973..8bff774f 100644 --- a/src/Samples.UITest/InformationManager.Test/InformationManager.Test.csproj +++ b/src/Samples.UITest/InformationManager.Test/InformationManager.Test.csproj @@ -8,10 +8,10 @@ - - - - + + + + diff --git a/src/Samples.UITest/Samples.UITest.sln b/src/Samples.UITest/Samples.UITest.sln index 3b467a48..025159f3 100644 --- a/src/Samples.UITest/Samples.UITest.sln +++ b/src/Samples.UITest/Samples.UITest.sln @@ -9,7 +9,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookLibrary.Test", "BookLib EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UITest.Core", "UITest.Core\UITest.Core.csproj", "{4B2174D9-B723-42AA-90DA-2F556409F19A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InformationManager.Test", "InformationManager.Test\InformationManager.Test.csproj", "{18006BE9-7056-48FB-97CF-F7B25C43358B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InformationManager.Test", "InformationManager.Test\InformationManager.Test.csproj", "{18006BE9-7056-48FB-97CF-F7B25C43358B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DAAFA839-8A98-4353-9AAD-CD1484DFEDE5}" + ProjectSection(SolutionItems) = preProject + Directory.Packages.props = Directory.Packages.props + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/src/Samples.UITest/UITest.Core/UITest.Core.csproj b/src/Samples.UITest/UITest.Core/UITest.Core.csproj index 69ec98c9..9ca9820d 100644 --- a/src/Samples.UITest/UITest.Core/UITest.Core.csproj +++ b/src/Samples.UITest/UITest.Core/UITest.Core.csproj @@ -8,7 +8,7 @@ - - + + diff --git a/src/Samples.UITest/Writer.Test/Writer.Test.csproj b/src/Samples.UITest/Writer.Test/Writer.Test.csproj index 0af6cea9..b38c0871 100644 --- a/src/Samples.UITest/Writer.Test/Writer.Test.csproj +++ b/src/Samples.UITest/Writer.Test/Writer.Test.csproj @@ -8,10 +8,10 @@ - - - - + + + + From 77a0f91c37fd31977d1899ed1425fd416426c6aa Mon Sep 17 00:00:00 2001 From: jbe2277 Date: Fri, 1 Nov 2024 20:24:05 +0100 Subject: [PATCH 4/7] Build: try to fix step summary headers --- .github/workflows/System.Waf.CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/System.Waf.CI.yml b/.github/workflows/System.Waf.CI.yml index 4ca9875a..6eff42dc 100644 --- a/.github/workflows/System.Waf.CI.yml +++ b/.github/workflows/System.Waf.CI.yml @@ -28,7 +28,7 @@ jobs: - name: 🕵️ Test run: | - echo "##🕵️ Test Results - System.Waf.sln" >> $GITHUB_STEP_SUMMARY + echo "##🕵️ Test Results - System.Waf.sln" >> $Env:$GITHUB_STEP_SUMMARY dotnet test ./src/System.Waf/System.Waf.sln -c Release --no-build --logger GitHubActions - name: 📦 Upload NuGet Packages @@ -42,7 +42,7 @@ jobs: - name: 🖥️ UI Test run: | - echo "##🕵️ Test Results - Samples.UITest.sln" >> $GITHUB_STEP_SUMMARY + echo "##🕵️ Test Results - Samples.UITest.sln" >> $Env:$GITHUB_STEP_SUMMARY dotnet test ./src/Samples.UITest/Samples.UITest.sln --logger GitHubActions -maxCpuCount:1 - name: 📦 Upload UI Test results From 81a6900d34c034e5262ba61b20f4c5dfc600e19e Mon Sep 17 00:00:00 2001 From: jbe2277 Date: Fri, 1 Nov 2024 20:29:11 +0100 Subject: [PATCH 5/7] Build: fix syntax error --- .github/workflows/System.Waf.CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/System.Waf.CI.yml b/.github/workflows/System.Waf.CI.yml index 6eff42dc..787d8c75 100644 --- a/.github/workflows/System.Waf.CI.yml +++ b/.github/workflows/System.Waf.CI.yml @@ -28,7 +28,7 @@ jobs: - name: 🕵️ Test run: | - echo "##🕵️ Test Results - System.Waf.sln" >> $Env:$GITHUB_STEP_SUMMARY + echo "##🕵️ Test Results - System.Waf.sln" >> $Env:GITHUB_STEP_SUMMARY dotnet test ./src/System.Waf/System.Waf.sln -c Release --no-build --logger GitHubActions - name: 📦 Upload NuGet Packages @@ -42,7 +42,7 @@ jobs: - name: 🖥️ UI Test run: | - echo "##🕵️ Test Results - Samples.UITest.sln" >> $Env:$GITHUB_STEP_SUMMARY + echo "##🕵️ Test Results - Samples.UITest.sln" >> $Env:GITHUB_STEP_SUMMARY dotnet test ./src/Samples.UITest/Samples.UITest.sln --logger GitHubActions -maxCpuCount:1 - name: 📦 Upload UI Test results From 64538628f3805f5cd60107f1bdf1d57289c043be Mon Sep 17 00:00:00 2001 From: jbe2277 Date: Fri, 1 Nov 2024 20:39:37 +0100 Subject: [PATCH 6/7] Build: fix minor formatting issue --- .github/workflows/System.Waf.CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/System.Waf.CI.yml b/.github/workflows/System.Waf.CI.yml index 787d8c75..f13535d3 100644 --- a/.github/workflows/System.Waf.CI.yml +++ b/.github/workflows/System.Waf.CI.yml @@ -28,7 +28,7 @@ jobs: - name: 🕵️ Test run: | - echo "##🕵️ Test Results - System.Waf.sln" >> $Env:GITHUB_STEP_SUMMARY + echo "## 🕵️ Test Results - System.Waf.sln" >> $Env:GITHUB_STEP_SUMMARY dotnet test ./src/System.Waf/System.Waf.sln -c Release --no-build --logger GitHubActions - name: 📦 Upload NuGet Packages @@ -42,7 +42,7 @@ jobs: - name: 🖥️ UI Test run: | - echo "##🕵️ Test Results - Samples.UITest.sln" >> $Env:GITHUB_STEP_SUMMARY + echo "## 🕵️ Test Results - Samples.UITest.sln" >> $Env:GITHUB_STEP_SUMMARY dotnet test ./src/Samples.UITest/Samples.UITest.sln --logger GitHubActions -maxCpuCount:1 - name: 📦 Upload UI Test results From 41baa9c3d52324a251957a4626017c7b0822f1d5 Mon Sep 17 00:00:00 2001 From: jbe2277 Date: Fri, 1 Nov 2024 20:42:54 +0100 Subject: [PATCH 7/7] UITest: add Directory.Build.props --- src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj | 3 --- src/Samples.UITest/Directory.Build.props | 6 ++++++ .../InformationManager.Test/InformationManager.Test.csproj | 3 --- src/Samples.UITest/Samples.UITest.sln | 1 + src/Samples.UITest/UITest.Core/UITest.Core.csproj | 3 --- src/Samples.UITest/Writer.Test/Writer.Test.csproj | 3 --- 6 files changed, 7 insertions(+), 12 deletions(-) create mode 100644 src/Samples.UITest/Directory.Build.props diff --git a/src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj b/src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj index a29fe908..b52542b2 100644 --- a/src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj +++ b/src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj @@ -2,9 +2,6 @@ net8.0-windows UITest.BookLibrary - - enable - enable diff --git a/src/Samples.UITest/Directory.Build.props b/src/Samples.UITest/Directory.Build.props new file mode 100644 index 00000000..b92e722b --- /dev/null +++ b/src/Samples.UITest/Directory.Build.props @@ -0,0 +1,6 @@ + + + enable + enable + + diff --git a/src/Samples.UITest/InformationManager.Test/InformationManager.Test.csproj b/src/Samples.UITest/InformationManager.Test/InformationManager.Test.csproj index 8bff774f..aa9d4a3c 100644 --- a/src/Samples.UITest/InformationManager.Test/InformationManager.Test.csproj +++ b/src/Samples.UITest/InformationManager.Test/InformationManager.Test.csproj @@ -2,9 +2,6 @@ net8.0-windows UITest.InformationManager - - enable - enable diff --git a/src/Samples.UITest/Samples.UITest.sln b/src/Samples.UITest/Samples.UITest.sln index 025159f3..1f32a63c 100644 --- a/src/Samples.UITest/Samples.UITest.sln +++ b/src/Samples.UITest/Samples.UITest.sln @@ -13,6 +13,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InformationManager.Test", " EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DAAFA839-8A98-4353-9AAD-CD1484DFEDE5}" ProjectSection(SolutionItems) = preProject + Directory.Build.props = Directory.Build.props Directory.Packages.props = Directory.Packages.props EndProjectSection EndProject diff --git a/src/Samples.UITest/UITest.Core/UITest.Core.csproj b/src/Samples.UITest/UITest.Core/UITest.Core.csproj index 9ca9820d..4aa0f5ed 100644 --- a/src/Samples.UITest/UITest.Core/UITest.Core.csproj +++ b/src/Samples.UITest/UITest.Core/UITest.Core.csproj @@ -2,9 +2,6 @@ net8.0-windows UITest - - enable - enable diff --git a/src/Samples.UITest/Writer.Test/Writer.Test.csproj b/src/Samples.UITest/Writer.Test/Writer.Test.csproj index b38c0871..aa26c3ef 100644 --- a/src/Samples.UITest/Writer.Test/Writer.Test.csproj +++ b/src/Samples.UITest/Writer.Test/Writer.Test.csproj @@ -2,9 +2,6 @@ net8.0-windows UITest.Writer - - enable - enable