From 66423b30ee0092b41d366641c80d234f62b11b9b Mon Sep 17 00:00:00 2001 From: Christopher Hirt Date: Mon, 3 Nov 2025 11:08:12 -0500 Subject: [PATCH 01/17] Add Windows CI (build-test-installer-release) * Add Windows GitHub Actions workflow - build-test-installer-release * Versioning is now handled via latest tag * Publish test results in the PR * rename SkipOnTeamCity to SkipOnCI --- .../build-test-installer-release.yml | 144 ++++++++++++++++++ .github/workflows/test-report.yml | 22 +++ README.md | 14 +- build/SayMore.proj | 100 +++++------- src/SayMoreTests/ApplicationContextTests.cs | 10 +- .../MPlayer/MediaPlayerViewModelTests.cs | 12 +- .../MediaUtils/MediaFileInfoTests.cs | 6 +- .../UI/ConvertMediaDlgViewModelTests.cs | 8 +- .../ElementListViewModelTests.cs | 2 +- .../UI/ProjectWindow/AppSmokeTests.cs | 4 +- .../SessionRecorderDlgViewModelTests.cs | 6 +- .../Utilities/FileSyncHelperTests.cs | 12 +- .../model/Files/ComponentFileTests.cs | 82 +++++----- .../BackgroundFileProcessorTests.cs | 10 +- .../DataGathering/PresetGathererTests.cs | 4 +- .../model/ProjectElementRenamingTests.cs | 16 +- src/SayMoreTests/model/ProjectElementTests.cs | 46 +++--- src/SayMoreTests/model/ProjectTests.cs | 2 +- .../model/SessionArchivingTests.cs | 8 +- src/SayMoreTests/model/SessionTests.cs | 4 +- 20 files changed, 331 insertions(+), 181 deletions(-) create mode 100644 .github/workflows/build-test-installer-release.yml create mode 100644 .github/workflows/test-report.yml diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml new file mode 100644 index 000000000..f9979e7bb --- /dev/null +++ b/.github/workflows/build-test-installer-release.yml @@ -0,0 +1,144 @@ +name: Build Test Installer Release + +on: + pull_request: + branches: + - main + push: + branches: + - main + tags: + - 'v*' + workflow_dispatch: + +permissions: + contents: write + id-token: write + +env: + Configuration: Release + +jobs: + build_test: + name: Build and test + runs-on: windows-latest + outputs: + version: ${{ steps.compute_version.outputs.version }} + + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Compute Version + id: compute_version + shell: bash + run: | + # If this is a tag push and it starts with v, just use it and strip off the v + if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then + Version="${GITHUB_REF#refs/tags/}" + Version="${Version#v}" + echo "version=$Version" >> $GITHUB_OUTPUT + echo "detected tag push: $Version" + exit 0 + fi + + # Otherwise find the latest tag that starts with v and strip off the v + LAST_TAG=$(git describe --tags --match "v*" --abbrev=0 2>/dev/null || echo "v0.0.0") + + # Compute a build number based on number of commits since that tag + COMMITS_SINCE_TAG=$(git rev-list ${LAST_TAG}..HEAD --count) + + # Final version: X.Y.Z + Version="${LAST_TAG#v}.${COMMITS_SINCE_TAG}" + echo "version=$Version" >> $GITHUB_OUTPUT + echo "no tag push; using $Version" + + - name: Setup NuGet + uses: NuGet/setup-nuget@v2 + + - name: Restore NuGet packages + run: nuget restore SayMore.sln + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + with: + vs-version: '[17.0,18.0)' + + - name: Build solution + run: msbuild build\SayMore.proj /t:Build /p:Configuration=$env:Configuration /p:Version=$env:Version /m + + - name: Run tests + run: msbuild build\SayMore.proj /t:Test /p:Configuration=$env:Configuration /p:useNUnit-x86=true /p:excludedCategories=SkipOnCI /m + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: saymore-test-results + if-no-files-found: warn + path: output/${{ env.Configuration }}/TestResults.xml + + build_installer: + name: Build installer, sign, and publish artifacts + needs: build_test + if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))) }} + runs-on: windows-latest + env: + Version: ${{ needs.build_test.outputs.version }} + + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v2 + + - name: Restore NuGet packages + run: nuget restore SayMore.sln + + - name: Fetch documentation artifacts + shell: bash + run: build/getDependencies-windows.sh + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + with: + vs-version: '[17.0,18.0)' + + - name: Build installer + run: msbuild build\SayMore.proj /t:Installer /p:Configuration=$env:Configuration /p:useNUnit-x86=true /p:Version=$env:Version /m + + - name: Sign installer + if: ${{ github.event_name != 'pull_request' }} + uses: sillsdev/codesign/trusted-signing-action@v3 + with: + credentials: ${{ secrets.TRUSTED_SIGNING_CREDENTIALS }} + files-folder: output/installer + files-folder-filter: SayMoreInstaller*.msi + + - name: Upload installer artifacts + uses: actions/upload-artifact@v4 + with: + name: saymore-installer + if-no-files-found: error + path: | + output/installer/SayMoreInstaller*.msi + output/installer/*.download_info + output/installer/appcast.xml + output/releasenotes.download_info + + - name: Create release + if: ${{ startsWith(github.ref, 'refs/tags/v') }} + uses: softprops/action-gh-release@v2 + with: + files: | + output/installer/SayMoreInstaller*.msi + output/installer/*.download_info + output/installer/appcast.xml + output/releasenotes.download_info + draft: true + generate_release_notes: true diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml new file mode 100644 index 000000000..70e06a640 --- /dev/null +++ b/.github/workflows/test-report.yml @@ -0,0 +1,22 @@ +name: 'Test Report' +# This is recommended to run after the CI workflow to publish test results since it has different +# permissions +on: + workflow_run: + workflows: ['CI'] # runs after CI workflow + types: + - completed +permissions: + contents: read + actions: read + checks: write +jobs: + report: + runs-on: ubuntu-latest + steps: + - uses: dorny/test-reporter@v2 + with: + artifact: saymore-test-results + name: NUnit Tests + path: '*.xml' # Path to test results (inside artifact .zip) + reporter: dotnet-nunit \ No newline at end of file diff --git a/README.md b/README.md index 6e0b01b10..283efb074 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SayMore™ +# SayMoreďż˝ SayMore provides an intuitive and enjoyable way to manage language documentation tasks. @@ -22,6 +22,14 @@ Please see [Tips for Testing Palaso Software](https://docs.google.com/document/d Reports can be entered in https://jira.sil.org/projects/SP/issues. They can be entered there via email by sending to saymore_issues@sil.org. -### Continuous Build System +## Github Actions CI +Every PR triggers a build and runs tests. -Each time code is checked in, an automatic build begins on our [TeamCity build server](https://build.palaso.org/project.html?projectId=SayMore&tab=projectOverview), running all the unit tests. This automatic build doesn't publish a new installer, however. That kind of build is launched manually, by pressing a button on the TeamCity page. This "publish" process builds SayMore, makes and installer, rsyncs it to the distribution server, and writes out a little bit of html which the [SayMore download page](https://software.sil.org/saymore/download/) then displays to the user. It also creates a build artifact that enables the SayMore program to check to see whether a newer version is available. +Every commit on the main branch will produce a signed installer for user testing as desired. Simply go to the Actions tab and find the Actions run for that commit if you want to download the installer. The installer is attached to the run artifact. + +# Release Process +To release a new version, just tag a commit on the main branch e.g. v3.7.5 +This will trigger Github Actions to produce a Release with the signed installer attached + +# Release TODO +Implement the "publish" process on TeamCity, which builds SayMore, makes and installer, rsyncs it to the distribution server, and writes out a little bit of html which the [SayMore download page](https://software.sil.org/saymore/download/) then displays to the user. It also creates a build artifact that enables the SayMore program to check to see whether a newer version is available. \ No newline at end of file diff --git a/build/SayMore.proj b/build/SayMore.proj index d5d96ce16..c3ebe5f6d 100644 --- a/build/SayMore.proj +++ b/build/SayMore.proj @@ -1,8 +1,7 @@ - $(MSBuildProjectDirectory)\.. - $(teamcity_build_checkoutDir) - 3.7.100 + $(MSBuildProjectDirectory)\.. + $(GITHUB_WORKSPACE) $(RootDir)/packages/SIL.BuildTasks.3.1.1/tools/SIL.BuildTasks.dll $(RootDir)/packages/SIL.BuildTasks/tools/SIL.BuildTasks.dll $(RootDir)/packages/SIL.ReleaseTasks.3.1.1/build/SIL.ReleaseTasks.props @@ -20,7 +19,6 @@ - @@ -33,20 +31,12 @@ - + + + 1.0.0.0 + - - - - - - - - - - - - + @@ -84,7 +74,7 @@ - - - + @@ -149,21 +131,34 @@ changing of the script, but I haven't figured that out. --> + ReplacementText ="Property_ProductVersion = "$(Version)"" /> - - + + - + + $(RootDir)\output\installer\SayMoreInstaller.msi + $(RootDir)\src\Installer\bin\$(Configuration)\SayMoreInstaller.msi + $(RootDir)\src\Installer\bin\$(Configuration)\en-us\SayMoreInstaller.msi + - - + + + + + + + + + @@ -177,25 +172,6 @@ - - @@ -203,20 +179,20 @@ + DestinationFiles="@(XliffFiles->'$(RootDir)/DistFiles/%(Filename)%(Extension)')" + SkipUnchangedFiles="true"/> + DirectoryReferenceId="ProgramDir" + ComponentGroupId="DistFiles" + RootDirectory="$(RootDir)\DistFiles" + OutputFilePath="$(RootDir)\output\Installer\GeneratedDistFiles.wxs" + MatchRegExPattern=".*" + > diff --git a/src/SayMoreTests/ApplicationContextTests.cs b/src/SayMoreTests/ApplicationContextTests.cs index b0e63db66..5511487c1 100644 --- a/src/SayMoreTests/ApplicationContextTests.cs +++ b/src/SayMoreTests/ApplicationContextTests.cs @@ -29,7 +29,7 @@ public void TearDown() /// /// This is mostly a "smoke test" for the Dependency Injection System /// - [Test][Category("SkipOnTeamCity")] + [Test][Category("SkipOnCI")] public void CreateWelcomeDialog_NotNull() { using(var appContext = new ApplicationContainer()) @@ -41,7 +41,7 @@ public void CreateWelcomeDialog_NotNull() } } - [Test][Category("SkipOnTeamCity")] + [Test][Category("SkipOnCI")] public void CreateWelcomeDialog_CanCreateOnAfterAnother() { using (var appContext = new ApplicationContainer()) @@ -55,7 +55,7 @@ public void CreateWelcomeDialog_CanCreateOnAfterAnother() /// This is mostly a "smoke test" for the Dependency Injection System /// [Test, Apartment(ApartmentState.STA)] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void CreateProjectContext_ProjectWindowIsNotNull() { using (var appContext = new ApplicationContainer()) @@ -74,7 +74,7 @@ private ProjectContext CreateProjectContext(ApplicationContainer appContext) [Test, Apartment(ApartmentState.STA)] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void CreateProjectContext_CanCreateTwoProjectsConsecutively() { using (var appContext = new ApplicationContainer()) @@ -93,7 +93,7 @@ public void CreateProjectContext_CanCreateTwoProjectsConsecutively() } [Test, Apartment(ApartmentState.STA)] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void ContainerSanityCheck_CanGet_ComponentFile_Factory() { using (var appContext = new ApplicationContainer()) diff --git a/src/SayMoreTests/MediaUtils/MPlayer/MediaPlayerViewModelTests.cs b/src/SayMoreTests/MediaUtils/MPlayer/MediaPlayerViewModelTests.cs index 103a86509..44e59bf40 100644 --- a/src/SayMoreTests/MediaUtils/MPlayer/MediaPlayerViewModelTests.cs +++ b/src/SayMoreTests/MediaUtils/MPlayer/MediaPlayerViewModelTests.cs @@ -74,7 +74,7 @@ public void HandlePlayerOutput_SendEOF_GetsPlaybackEndedEvent() /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void HandlePlayerOutput_SendEOF_GetsMediaQueuedEvent() { var file = LoadMediaFile(); @@ -238,7 +238,7 @@ public void Play_CallWhenNotPaused_DoesNotWriteToInputStream() } /// ------------------------------------------------------------------------------------ - [Test][Category("SkipOnTeamCity")] + [Test][Category("SkipOnCI")] public void LoadAndPlayFile_FileNameHasAsciiCharacter_Plays() { var pathname = MediaFileInfoTests.GetShortTestAudioFile(); @@ -258,7 +258,7 @@ public void LoadAndPlayFile_FileNameHasAsciiCharacter_Plays() } /// ------------------------------------------------------------------------------------ - [Test][Category("SkipOnTeamCity")] + [Test][Category("SkipOnCI")] public void LoadAndPlayFile_FileNameHasNonAsciiCharacter_Plays() { var source = MediaFileInfoTests.GetShortTestAudioFile(); @@ -284,7 +284,7 @@ public void LoadAndPlayFile_FileNameHasNonAsciiCharacter_Plays() /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void LoadAndPlayFile_FolderHasNonAsciiCharacter_Plays() { var source = MediaFileInfoTests.GetShortTestAudioFile(); @@ -312,7 +312,7 @@ public void LoadAndPlayFile_FolderHasNonAsciiCharacter_Plays() } /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void LoadFile_Called_CallsQueuesMediaEvent() { bool eventCalled = false; @@ -331,7 +331,7 @@ public void LoadFile_Called_CallsQueuesMediaEvent() /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void LoadFile_Called_MediaInfoAcquired() { Assert.IsNull(_model.MediaInfo); diff --git a/src/SayMoreTests/MediaUtils/MediaFileInfoTests.cs b/src/SayMoreTests/MediaUtils/MediaFileInfoTests.cs index ed47ad096..2098ee0ef 100644 --- a/src/SayMoreTests/MediaUtils/MediaFileInfoTests.cs +++ b/src/SayMoreTests/MediaUtils/MediaFileInfoTests.cs @@ -98,7 +98,7 @@ public static string CreateRecording(string folder) /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void Duration_Audio_Correct() { using (var folder = new TemporaryFolder("FileStatisticsTests")) @@ -114,7 +114,7 @@ public void Duration_Audio_Correct() /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void MPlayerMediaInfo_CreateAudio_ContainsCorrectInfo() { var tmpfile = GetShortTestAudioFile(); @@ -136,7 +136,7 @@ public void MPlayerMediaInfo_CreateAudio_ContainsCorrectInfo() /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void MPlayerMediaInfo_CreateVideo_ContainsCorrectInfo() { var tmpfile = GetTestVideoFile(); diff --git a/src/SayMoreTests/UI/ConvertMediaDlgViewModelTests.cs b/src/SayMoreTests/UI/ConvertMediaDlgViewModelTests.cs index 9513ee80d..e92aff141 100644 --- a/src/SayMoreTests/UI/ConvertMediaDlgViewModelTests.cs +++ b/src/SayMoreTests/UI/ConvertMediaDlgViewModelTests.cs @@ -95,7 +95,7 @@ public void BuildCommandLine_CommandLineIncludesAudioBitRateReplacementMarkers_R /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void BeginConversion_WhenOutputFileNotSpecified_CreatesInferredOutputFile() { _model.BeginConversion(null); @@ -107,7 +107,7 @@ public void BeginConversion_WhenOutputFileNotSpecified_CreatesInferredOutputFile /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void BeginConversion_WhenOutputFileIsSpecified_CreatesSpecifiedOutputFile() { _model.BeginConversion(null, _tempFolder.Combine("blah.mp3")); @@ -116,7 +116,7 @@ public void BeginConversion_WhenOutputFileIsSpecified_CreatesSpecifiedOutputFile /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void BeginConversion_WithReportingAction_ReportingActionCalledWithCommandLine() { var goodCallBack = false; @@ -131,7 +131,7 @@ public void BeginConversion_WithReportingAction_ReportingActionCalledWithCommand /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void BeginConversion_WithReportingAction_ReportsProgressingTime() { var currentTime = default(TimeSpan); diff --git a/src/SayMoreTests/UI/ElementListScreen/ElementListViewModelTests.cs b/src/SayMoreTests/UI/ElementListScreen/ElementListViewModelTests.cs index 5a89c6925..54437dd86 100644 --- a/src/SayMoreTests/UI/ElementListScreen/ElementListViewModelTests.cs +++ b/src/SayMoreTests/UI/ElementListScreen/ElementListViewModelTests.cs @@ -238,7 +238,7 @@ public void VerifyAllElementsStillExist_OneRemoved_ReturnsFalse() /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void DeleteComponentFile_PassesGoodFile_RemovesFile() { _model.SetSelectedElement(_model.Elements.ElementAt(1) as Person); diff --git a/src/SayMoreTests/UI/ProjectWindow/AppSmokeTests.cs b/src/SayMoreTests/UI/ProjectWindow/AppSmokeTests.cs index 2894ffa40..4ada39f8a 100644 --- a/src/SayMoreTests/UI/ProjectWindow/AppSmokeTests.cs +++ b/src/SayMoreTests/UI/ProjectWindow/AppSmokeTests.cs @@ -97,7 +97,7 @@ private void SetupProjectWindow(string prjFile) /// ------------------------------------------------------------------------------------ [Test, Apartment(ApartmentState.STA)] - [NUnit.Framework.Category("SkipOnTeamCity")] + [NUnit.Framework.Category("SkipOnCI")] [NonParallelizable] public void Application_WalkThrough_DoesNotCrash() { @@ -220,7 +220,7 @@ private static void DeleteItems(ListPanel listPanel, string screenName) /// ------------------------------------------------------------------------------------ [Test, Apartment(ApartmentState.STA)] - [NUnit.Framework.Category("SkipOnTeamCity")] + [NUnit.Framework.Category("SkipOnCI")] [NonParallelizable] public void Application_CreateProject_DoesNotCrash() { diff --git a/src/SayMoreTests/UI/SessionRecording/SessionRecorderDlgViewModelTests.cs b/src/SayMoreTests/UI/SessionRecording/SessionRecorderDlgViewModelTests.cs index fb0a48863..ebabfd65e 100644 --- a/src/SayMoreTests/UI/SessionRecording/SessionRecorderDlgViewModelTests.cs +++ b/src/SayMoreTests/UI/SessionRecording/SessionRecorderDlgViewModelTests.cs @@ -55,7 +55,7 @@ public void TearDown() /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void BeginRecording_AfterConstruction_PutsIntoRecordingState() { _model.BeginRecording(); @@ -67,7 +67,7 @@ public void BeginRecording_AfterConstruction_PutsIntoRecordingState() /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void BeginRecording_AfterStoppingPlayBack_PutsIntoRecordingState() { _model.BeginRecording(); @@ -93,7 +93,7 @@ private static void Wait(double howLong) } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void MoveRecordingToSessionFolder_MovesFile() { _model.BeginRecording(); diff --git a/src/SayMoreTests/Utilities/FileSyncHelperTests.cs b/src/SayMoreTests/Utilities/FileSyncHelperTests.cs index dc24b9151..7cfca46fc 100644 --- a/src/SayMoreTests/Utilities/FileSyncHelperTests.cs +++ b/src/SayMoreTests/Utilities/FileSyncHelperTests.cs @@ -7,7 +7,7 @@ namespace SayMoreTests.Utilities [TestFixture] public class FileSyncHelperTests { - [Test][Category("SkipOnTeamCity")] + [Test][Category("SkipOnCI")] public void IsSynched_Dropbox_ReturnsDropbox() { if (!FileSyncHelper.ClientIsRunning(FileSyncHelper.SyncClient.Dropbox)) @@ -19,7 +19,7 @@ public void IsSynched_Dropbox_ReturnsDropbox() Assert.AreEqual(FileSyncHelper.SyncClient.Dropbox, result); } - [Test][Category("SkipOnTeamCity")] + [Test][Category("SkipOnCI")] public void IsSynched_GoogleDrive_ReturnsGoogleDrive() { if (!FileSyncHelper.ClientIsRunning(FileSyncHelper.SyncClient.GoogleDrive)) @@ -31,7 +31,7 @@ public void IsSynched_GoogleDrive_ReturnsGoogleDrive() Assert.AreEqual(FileSyncHelper.SyncClient.GoogleDrive, result); } - [Test][Category("SkipOnTeamCity")] + [Test][Category("SkipOnCI")] public void IsSynched_OneDrive_ReturnsOneDrive() { if (!FileSyncHelper.ClientIsRunning(FileSyncHelper.SyncClient.OneDrive)) @@ -43,7 +43,7 @@ public void IsSynched_OneDrive_ReturnsOneDrive() Assert.AreEqual(FileSyncHelper.SyncClient.OneDrive, result); } - [Test][Category("SkipOnTeamCity")] + [Test][Category("SkipOnCI")] public void StopClient_Dropbox_KillAndStart() { if (!FileSyncHelper.ClientIsRunning(FileSyncHelper.SyncClient.Dropbox)) @@ -62,7 +62,7 @@ public void StopClient_Dropbox_KillAndStart() Assert.True(FileSyncHelper.ClientIsRunning(FileSyncHelper.SyncClient.Dropbox)); } - [Test][Category("SkipOnTeamCity")] + [Test][Category("SkipOnCI")] public void StopClient_GoogleDrive_KillAndStart() { if (!FileSyncHelper.ClientIsRunning(FileSyncHelper.SyncClient.GoogleDrive)) @@ -81,7 +81,7 @@ public void StopClient_GoogleDrive_KillAndStart() Assert.True(FileSyncHelper.ClientIsRunning(FileSyncHelper.SyncClient.GoogleDrive)); } - [Test][Category("SkipOnTeamCity")] + [Test][Category("SkipOnCI")] public void StopClient_OneDrive_KillAndStart() { if (!FileSyncHelper.ClientIsRunning(FileSyncHelper.SyncClient.OneDrive)) diff --git a/src/SayMoreTests/model/Files/ComponentFileTests.cs b/src/SayMoreTests/model/Files/ComponentFileTests.cs index 5c778fdab..b4da3d417 100644 --- a/src/SayMoreTests/model/Files/ComponentFileTests.cs +++ b/src/SayMoreTests/model/Files/ComponentFileTests.cs @@ -40,7 +40,7 @@ public void TearDown() /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetFileType_IsText_GivesTextFileType() { var f = CreateComponentFile("abc.txt"); @@ -79,7 +79,7 @@ public static ComponentFile CreateComponentFile(TemporaryFolder parentFolder, /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void MoveToRecycleBin_MoveBothFileAndMetaFile_MovesFiles() { var f = CreateComponentFile("abc.zzz"); @@ -90,7 +90,7 @@ public void MoveToRecycleBin_MoveBothFileAndMetaFile_MovesFiles() /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void MoveToRecycleBin_MissingComponentFile_Fails() { var f = CreateComponentFile("abc.zzz"); @@ -101,7 +101,7 @@ public void MoveToRecycleBin_MissingComponentFile_Fails() /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void MoveToRecycleBin_MissingMetadataFile_FailsButReturnsTrue() { var f = CreateComponentFile("abc.zzz"); @@ -112,7 +112,7 @@ public void MoveToRecycleBin_MissingMetadataFile_FailsButReturnsTrue() /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetFileType_UnknownType_UnknownFileType() { var f = CreateComponentFile("abc.zzz"); @@ -120,7 +120,7 @@ public void GetFileType_UnknownType_UnknownFileType() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetStringValue_FieldMissing_ReturnsSpecifiedDefault() { var f = CreateComponentFile("abc.zzz"); @@ -128,7 +128,7 @@ public void GetStringValue_FieldMissing_ReturnsSpecifiedDefault() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetStringValue_FieldIsThere_ReturnsCorrectValue() { var f = CreateComponentFile("abc.zzz"); @@ -137,7 +137,7 @@ public void GetStringValue_FieldIsThere_ReturnsCorrectValue() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetValue_FieldMissing_ReturnsSpecifiedDefault() { var f = CreateComponentFile("abc.zzz"); @@ -145,7 +145,7 @@ public void GetValue_FieldMissing_ReturnsSpecifiedDefault() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetValue_FieldIsThere_ReturnsCorrectValue() { var f = CreateComponentFile("abc.zzz"); @@ -154,7 +154,7 @@ public void GetValue_FieldIsThere_ReturnsCorrectValue() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void RenameId_FieldIsThere_Succeeds() { var f = CreateComponentFile("abc.zzz"); @@ -168,7 +168,7 @@ public void RenameId_FieldIsThere_Succeeds() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void RenameId_FieldIsThere_OldIdReturnsNothing() { var f = CreateComponentFile("abc.zzz"); @@ -180,7 +180,7 @@ public void RenameId_FieldIsThere_OldIdReturnsNothing() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void RenameId_FieldIsThere_NewIdReturnsOldValue() { var f = CreateComponentFile("abc.zzz"); @@ -192,7 +192,7 @@ public void RenameId_FieldIsThere_NewIdReturnsOldValue() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void RenameId_FieldMissing_ReturnsFalse() { var f = CreateComponentFile("abc.zzz"); @@ -205,7 +205,7 @@ public void RenameId_FieldMissing_ReturnsFalse() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void RenameId_FieldMissing_NewIdReturnsNothing() { var f = CreateComponentFile("abc.zzz"); @@ -215,7 +215,7 @@ public void RenameId_FieldMissing_NewIdReturnsNothing() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void RemoveField_FieldIsThere_RemovesIt() { var f = CreateComponentFile("abc.zzz"); @@ -227,7 +227,7 @@ public void RemoveField_FieldIsThere_RemovesIt() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void RemoveField_FieldIsThere_OldIdReturnsNothing() { var f = CreateComponentFile("abc.zzz"); @@ -238,7 +238,7 @@ public void RemoveField_FieldIsThere_OldIdReturnsNothing() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void RemoveField_FieldMissing_DoesNothing() { var f = CreateComponentFile("abc.zzz"); @@ -249,7 +249,7 @@ public void RemoveField_FieldMissing_DoesNothing() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void SetValue_ChangingValue_NewValueOverwritesOld() { var f = CreateComponentFile("abc.zzz"); @@ -259,7 +259,7 @@ public void SetValue_ChangingValue_NewValueOverwritesOld() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetCanHaveAnnotationFile_IsNotMediaFile_ReturnsFalse() { var f = CreateComponentFile("abc.zzz"); @@ -267,7 +267,7 @@ public void GetCanHaveAnnotationFile_IsNotMediaFile_ReturnsFalse() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetCanHaveAnnotationFile_IsWaveFile_ReturnsTrue() { var f = CreateAudioComponentFile("abc.wav"); @@ -275,7 +275,7 @@ public void GetCanHaveAnnotationFile_IsWaveFile_ReturnsTrue() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetCanHaveAnnotationFile_IsMp3File_ReturnsTrue() { var f = CreateAudioComponentFile("abc.mp3"); @@ -283,7 +283,7 @@ public void GetCanHaveAnnotationFile_IsMp3File_ReturnsTrue() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetSuggestedPathToAnnotationFile_IsNotMediaFile_ReturnsNull() { var f = CreateComponentFile("abc.zzz"); @@ -291,7 +291,7 @@ public void GetSuggestedPathToAnnotationFile_IsNotMediaFile_ReturnsNull() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetSuggestedPathToAnnotationFile_FileIsWave_ReturnsFolderPath() { var f = CreateAudioComponentFile("abc.wav"); @@ -301,7 +301,7 @@ public void GetSuggestedPathToAnnotationFile_FileIsWave_ReturnsFolderPath() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetSuggestedPathToAnnotationFile_FileIsMp3_ReturnsFolderPath() { var f = CreateAudioComponentFile("abc.mp3"); @@ -311,14 +311,14 @@ public void GetSuggestedPathToAnnotationFile_FileIsMp3_ReturnsFolderPath() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetDoesHaveAnnotationFile_IsNotMediaFile_ReturnsFalse() { Assert.IsFalse(CreateComponentFile("abc.zzz").GetDoesHaveAnnotationFile()); } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetDoesHaveAnnotationFile_IsMediaFileButDoesNotHaveEafFile_ReturnsFalse() { var file = CreateAudioComponentFile("abc.mp3"); @@ -331,7 +331,7 @@ public void GetDoesHaveAnnotationFile_IsMediaFileButDoesNotHaveEafFile_ReturnsFa } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetDoesHaveAnnotationFile_IsMediaFileAndHasEafFile_ReturnsTrue() { Assert.IsTrue(CreateAudioComponentFile("abc.mp3").GetDoesHaveAnnotationFile()); @@ -339,7 +339,7 @@ public void GetDoesHaveAnnotationFile_IsMediaFileAndHasEafFile_ReturnsTrue() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetSuggestedPathToOralAnnotationFile_FileCanBeAnnotated_ReturnsCorrectPath() { Assert.AreEqual("abc.mp3.oralAnnotations.wav", Path.GetFileName( @@ -362,7 +362,7 @@ public void GetSuggestedPathToOralAnnotationFile_FileCanBeAnnotated_ReturnsCorre } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetSuggestedPathToAnnotationFile_FileCannotBeAnnotated_ReturnsNull() { var file = CreateAudioComponentFile("abc.pdf"); @@ -370,7 +370,7 @@ public void GetSuggestedPathToAnnotationFile_FileCannotBeAnnotated_ReturnsNull() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetSuggestedPathToAnnotationFile_FileCanBeAnnotated_ReturnsCorrectPath() { Assert.AreEqual("abc.mp3.annotations.eaf", Path.GetFileName( @@ -393,7 +393,7 @@ public void GetSuggestedPathToAnnotationFile_FileCanBeAnnotated_ReturnsCorrectPa } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetSuggestedPathToStandardAudioFile_FileCannotBeAnnotated_ReturnsNull() { var file = CreateAudioComponentFile("abc.pdf"); @@ -401,7 +401,7 @@ public void GetSuggestedPathToStandardAudioFile_FileCannotBeAnnotated_ReturnsNul } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetSuggestedPathToStandardAudioFile_FileCanBeAnnotated_ReturnsCorrectPath() { foreach (var ext in new[] { "mp3", "wav", "wma", "flac" }) @@ -484,7 +484,7 @@ private static ComponentFile CreateComponentFileWithRoleChoices(ProjectElement p } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetRelevantComponentRoles_ForEvent_ReturnsOnlySessionRoles() { using (var folder = new TemporaryFolder("TestGetRelevantComponentRoles")) @@ -497,7 +497,7 @@ public void GetRelevantComponentRoles_ForEvent_ReturnsOnlySessionRoles() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetRelevantComponentRoles_ForPerson_ReturnsOnlyPersonRoles() { using (var folder = new TemporaryFolder("TestGetRelevantComponentRoles")) @@ -510,7 +510,7 @@ public void GetRelevantComponentRoles_ForPerson_ReturnsOnlyPersonRoles() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetAssignedRoles_NoRoles_ReturnsEmptyEnumerator() { ComponentFile f = CreateComponentFileWithRoleChoices("abc.txt"); @@ -518,7 +518,7 @@ public void GetAssignedRoles_NoRoles_ReturnsEmptyEnumerator() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetAssignedRoles_HasOneRoles_ReturnsThem() { ComponentFile f = CreateComponentFileWithRoleChoices("abc_Source.avi"); @@ -526,7 +526,7 @@ public void GetAssignedRoles_HasOneRoles_ReturnsThem() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetAssignedRoles_ForConsentAndSessionType_ReturnsEmptyEnumerator() { ComponentFile f = CreateComponentFileWithRoleChoices("abc_Consent.txt"); @@ -534,7 +534,7 @@ public void GetAssignedRoles_ForConsentAndSessionType_ReturnsEmptyEnumerator() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetAssignedRoles_ForConsentAndPersonType_ReturnsThem() { ComponentFile f = CreateComponentFileWithRoleChoices("abc_Consent.txt"); @@ -542,7 +542,7 @@ public void GetAssignedRoles_ForConsentAndPersonType_ReturnsThem() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetAssignedRoles_ForTranslation_ReturnCorrectOne() { ComponentFile f = CreateComponentFileWithRoleChoices("abc_Translation.txt"); @@ -550,7 +550,7 @@ public void GetAssignedRoles_ForTranslation_ReturnCorrectOne() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetAssignedRoles_HasTranslationWIthLanguageTag_ReturnTranslation() { ComponentFile f = CreateComponentFileWithRoleChoices("abc_Translation-xyz.txt"); @@ -558,7 +558,7 @@ public void GetAssignedRoles_HasTranslationWIthLanguageTag_ReturnTranslation() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void IdentifyAsRole_FileRenamed() { var f = CreateComponentFile("abc.txt"); diff --git a/src/SayMoreTests/model/Files/DataGathering/BackgroundFileProcessorTests.cs b/src/SayMoreTests/model/Files/DataGathering/BackgroundFileProcessorTests.cs index 03555d658..e5ca93a0f 100644 --- a/src/SayMoreTests/model/Files/DataGathering/BackgroundFileProcessorTests.cs +++ b/src/SayMoreTests/model/Files/DataGathering/BackgroundFileProcessorTests.cs @@ -31,7 +31,7 @@ public void TearDown() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetAllFileData_SomeFiles_NonEmptyList() { WriteTestWav(@"blah blah"); @@ -44,7 +44,7 @@ public void GetAllFileData_SomeFiles_NonEmptyList() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetData_FileRenamed_RemovesOldGivesNew() { var source = WriteTestWav(@"first"); @@ -64,7 +64,7 @@ public void GetData_FileRenamed_RemovesOldGivesNew() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetData_LinuxHiddenFile_FileNotReturned() { var hiddenFile = WriteLinuxHidden(".DS_Store", "DS_Store file"); @@ -79,7 +79,7 @@ public void GetData_LinuxHiddenFile_FileNotReturned() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void Start_OneRelevantFileExists_FiresNewDataAvailableEvent() { WriteTestWav(@"first"); @@ -93,7 +93,7 @@ public void Start_OneRelevantFileExists_FiresNewDataAvailableEvent() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void Background_FileOverwritten_FiresNewDataAvailableEvent() { WriteTestWav(@"first"); diff --git a/src/SayMoreTests/model/Files/DataGathering/PresetGathererTests.cs b/src/SayMoreTests/model/Files/DataGathering/PresetGathererTests.cs index 94871adea..a5e24ce5e 100644 --- a/src/SayMoreTests/model/Files/DataGathering/PresetGathererTests.cs +++ b/src/SayMoreTests/model/Files/DataGathering/PresetGathererTests.cs @@ -30,7 +30,7 @@ public void TearDown() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetPresets_NoFiles_GetNoPresetsMessageOnly() { using (var gatherer = CreatePresetGatherer()) @@ -43,7 +43,7 @@ public void GetPresets_NoFiles_GetNoPresetsMessageOnly() [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void Background_SidecarDataChanged_PresetChanged() { WriteTestWavWithSidecar(@"source"); diff --git a/src/SayMoreTests/model/ProjectElementRenamingTests.cs b/src/SayMoreTests/model/ProjectElementRenamingTests.cs index b8d2097ec..b1af47537 100644 --- a/src/SayMoreTests/model/ProjectElementRenamingTests.cs +++ b/src/SayMoreTests/model/ProjectElementRenamingTests.cs @@ -56,7 +56,7 @@ private static string SaveAndChangeIdShouldFail(Session session, string newId) } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void TryChangeIdAndSave_FolderPathUpdated() { var newEvent = CreateSession(); @@ -65,7 +65,7 @@ public void TryChangeIdAndSave_FolderPathUpdated() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void TryChangeIdAndSave_SettingsFilePathUpdated() { var newEvent = CreateSession(); @@ -74,7 +74,7 @@ public void TryChangeIdAndSave_SettingsFilePathUpdated() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void TryChangeIdAndSave_FolderRenamed() { var newEvent = CreateSession(); @@ -84,7 +84,7 @@ public void TryChangeIdAndSave_FolderRenamed() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void TryChangeIdAndSave_ElementMetaDataFileRenamed() { var newEvent = CreateSession(); @@ -95,7 +95,7 @@ public void TryChangeIdAndSave_ElementMetaDataFileRenamed() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void TryChangeIdAndSave_HasFilesWithOldName_RenamesFiles() { var newEvent = CreateSession(); @@ -106,7 +106,7 @@ public void TryChangeIdAndSave_HasFilesWithOldName_RenamesFiles() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void TryChangeIdAndSave_NewIdIsEmptyString_ReturnsFalse() { var newEvent = CreateSession(); @@ -114,7 +114,7 @@ public void TryChangeIdAndSave_NewIdIsEmptyString_ReturnsFalse() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void TryChangeIdAndSave_NewIdIsInvalidFolderName_ReturnsFalse() { var newEvent = CreateSession(); @@ -123,7 +123,7 @@ public void TryChangeIdAndSave_NewIdIsInvalidFolderName_ReturnsFalse() [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void TryChangeIdAndSave_NewIdAlreadyInUse_ReturnsFalse() { var newEvent = CreateSession(); diff --git a/src/SayMoreTests/model/ProjectElementTests.cs b/src/SayMoreTests/model/ProjectElementTests.cs index d9ab094e2..1142f0b34 100644 --- a/src/SayMoreTests/model/ProjectElementTests.cs +++ b/src/SayMoreTests/model/ProjectElementTests.cs @@ -38,7 +38,7 @@ public void TearDown() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void Save_NewlyCreated_CreatesMetaDataFile() { using (var person = CreatePerson()) @@ -91,7 +91,7 @@ public string SetValue(Person person, string key, string value) } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void Load_AfterSaveOfFactoryField_PreservesId() { using (var person = CreatePerson()) @@ -108,7 +108,7 @@ public void Load_AfterSaveOfFactoryField_PreservesId() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void Load_AfterSave_ChangesUnknownIdToCustomId() { using (var person = CreatePerson()) @@ -124,7 +124,7 @@ public void Load_AfterSave_ChangesUnknownIdToCustomId() } } - [Test][Category("SkipOnTeamCity")] + [Test][Category("SkipOnCI")] public void GetComponentFiles_AfterCreation_GivesASingleFile() { using (var person = CreatePerson()) @@ -135,7 +135,7 @@ public void GetComponentFiles_AfterCreation_GivesASingleFile() } } - [Test][Category("SkipOnTeamCity")] + [Test][Category("SkipOnCI")] public void GetComponentFiles_SomeFiles_GivesThem() { using (var person = CreatePerson()) @@ -145,7 +145,7 @@ public void GetComponentFiles_SomeFiles_GivesThem() } } - [Test][Category("SkipOnTeamCity")] + [Test][Category("SkipOnCI")] public void GetFilesToCopy_AllValid_RemovesNone() { using (var fileToAdd1 = new TempFile()) @@ -169,7 +169,7 @@ public void GetFilesToCopy_AllValid_RemovesNone() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void RemoveInvalidFilesFromProspectiveFilesToAdd_NullInput_ReturnsEmptyList() { using (var person = CreatePerson()) @@ -180,7 +180,7 @@ public void RemoveInvalidFilesFromProspectiveFilesToAdd_NullInput_ReturnsEmptyLi } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void RemoveInvalidFilesFromProspectiveFilesToAdd_EmptyListInput_ReturnsEmptyList() { using (var person = CreatePerson()) @@ -191,7 +191,7 @@ public void RemoveInvalidFilesFromProspectiveFilesToAdd_EmptyListInput_ReturnsEm } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetValidFilesToCopy_ExcludeExistingSomeInvalid_RemovesInvalidFiles() { using (var fileToAdd = new TempFile()) @@ -216,7 +216,7 @@ public void GetValidFilesToCopy_ExcludeExistingSomeInvalid_RemovesInvalidFiles() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetValidFilesToCopy_IncludeExistingSomeInvalid_RemovesInvalidFiles() { using (var fileToAdd = new TempFile()) @@ -245,7 +245,7 @@ public void GetValidFilesToCopy_IncludeExistingSomeInvalid_RemovesInvalidFiles() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void AddComponentFile_SomeFile_AddsIt() { using (var person = CreatePerson()) @@ -263,7 +263,7 @@ public void AddComponentFile_SomeFile_AddsIt() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void AddComponentFiles_SomeFiles_AddsThem() { using (var person = CreatePerson()) @@ -283,7 +283,7 @@ public void AddComponentFiles_SomeFiles_AddsThem() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void AddComponentFile_FileAlreadyExistsInDest_DoesNotAdd() { using (var person = CreatePerson()) @@ -303,7 +303,7 @@ public void AddComponentFile_FileAlreadyExistsInDest_DoesNotAdd() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void AddComponentFiles_AtLeastOneFileAlreadyExistsInDest_AddsOneNotOther() { using (var person = CreatePerson()) @@ -329,7 +329,7 @@ public void AddComponentFiles_AtLeastOneFileAlreadyExistsInDest_AddsOneNotOther( } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetNewDefaultElementName_NoClashOnFirstTry_GivesName() { using (var person = CreatePerson()) @@ -339,7 +339,7 @@ public void GetNewDefaultElementName_NoClashOnFirstTry_GivesName() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetNewDefaultElementName_FindsClash_GivesName() { using (var person = CreatePerson()) @@ -351,7 +351,7 @@ public void GetNewDefaultElementName_FindsClash_GivesName() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetShowAsNormalComponentFile_IsElanPrefFile_ReturnsFalse() { using (var person = CreatePerson()) @@ -362,7 +362,7 @@ public void GetShowAsNormalComponentFile_IsElanPrefFile_ReturnsFalse() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetShowAsNormalComponentFile_HasAnnotationFileExtButNotSuffix_ReturnsTrue() { File.OpenWrite(_parentFolder.Combine("peas.mp3")).Close(); @@ -375,7 +375,7 @@ public void GetShowAsNormalComponentFile_HasAnnotationFileExtButNotSuffix_Return } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetShowAsNormalComponentFile_HasAnnotationFileExtAndSuffix_ReturnsFalse() { File.OpenWrite(_parentFolder.Combine("corn.mp3")).Close(); @@ -388,7 +388,7 @@ public void GetShowAsNormalComponentFile_HasAnnotationFileExtAndSuffix_ReturnsFa } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetShowAsNormalComponentFile_IsMetaFile_ReturnsFalse() { using (var person = CreatePerson()) @@ -399,7 +399,7 @@ public void GetShowAsNormalComponentFile_IsMetaFile_ReturnsFalse() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetShowAsNormalComponentFile_IsThumbsFile_ReturnsFalse() { using (var person = CreatePerson()) @@ -410,7 +410,7 @@ public void GetShowAsNormalComponentFile_IsThumbsFile_ReturnsFalse() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetShowAsNormalComponentFile_IsPersonFile_ReturnsFalse() { using (var person = CreatePerson()) @@ -421,7 +421,7 @@ public void GetShowAsNormalComponentFile_IsPersonFile_ReturnsFalse() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetShowAsNormalComponentFile_IsEventFile_ReturnsFalse() { using (var session = CreateSession()) diff --git a/src/SayMoreTests/model/ProjectTests.cs b/src/SayMoreTests/model/ProjectTests.cs index 131ab9d64..5a17ef428 100644 --- a/src/SayMoreTests/model/ProjectTests.cs +++ b/src/SayMoreTests/model/ProjectTests.cs @@ -300,7 +300,7 @@ private void TrackFiles(string groupId, IEnumerable files, string msg) ///// ------------------------------------------------------------------------------------ //[Test] - //[Category("SkipOnTeamCity")] + //[Category("SkipOnCI")] //public void SetFilesToArchive_ParticipantFileDoNotExist_DoesNotCrash() //{ // var model = new Mock(MockBehavior.Loose, "SayMore", "ddo", "ddo-session", null); diff --git a/src/SayMoreTests/model/SessionArchivingTests.cs b/src/SayMoreTests/model/SessionArchivingTests.cs index 8a0c0d325..2d9a9fbf7 100644 --- a/src/SayMoreTests/model/SessionArchivingTests.cs +++ b/src/SayMoreTests/model/SessionArchivingTests.cs @@ -96,7 +96,7 @@ public void TearDown() /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void SetFilesToArchive_RAMP_GetsCorrectListSizeIncludingSessionFile() { var model = new Mock(MockBehavior.Strict, "SayMore", "ddo", @@ -111,7 +111,7 @@ public void SetFilesToArchive_RAMP_GetsCorrectListSizeIncludingSessionFile() /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void SetFilesToArchive_IMDI_GetsCorrectListSizeExcludingSessionFile() { var model = new Mock(MockBehavior.Strict, "SayMore", "ddo", @@ -312,7 +312,7 @@ public void GetOneLanguage_DefinedName_ReturnsCodeAndName() } [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetOneLanguage_UndefinedIso_ReturnsNull() { ArchivingHelper.Project = null; @@ -353,7 +353,7 @@ public void GetOneLanguage_UnknownLanguageCodeOrName_ReturnsNull() /// [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetOneLanguage_PrivateUseIso_ReturnsNull() { ArchivingHelper.Project = null; diff --git a/src/SayMoreTests/model/SessionTests.cs b/src/SayMoreTests/model/SessionTests.cs index f0b635c2a..5516a49ec 100644 --- a/src/SayMoreTests/model/SessionTests.cs +++ b/src/SayMoreTests/model/SessionTests.cs @@ -382,7 +382,7 @@ public void GetCompletedStages_TwoParticipantsFoundBothHaveConsent_ResultInclude /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetValidFilesToCopy_TwoMediaFilesToBeCopiedToSessionWithNoExistingSource_FirstOneRenamedAsSource() { using (var session = CreateSession(new string[] { })) @@ -405,7 +405,7 @@ public void GetValidFilesToCopy_TwoMediaFilesToBeCopiedToSessionWithNoExistingSo /// ------------------------------------------------------------------------------------ [Test] - [Category("SkipOnTeamCity")] + [Category("SkipOnCI")] public void GetValidFilesToCopy_TwoMediaFilesToBeCopiedToSessionWithSourceMarkedComplete_FirstOneRenamedAsSource() { using (var session = CreateSession(new string[] { })) From 5cc01d7666154de731e4cc0c2c31d842808d1e9a Mon Sep 17 00:00:00 2001 From: Christopher Hirt Date: Mon, 3 Nov 2025 21:16:08 -0500 Subject: [PATCH 02/17] what if we run all tests on CI? --- .github/workflows/build-test-installer-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index f9979e7bb..cf6834492 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -44,13 +44,13 @@ jobs: exit 0 fi - # Otherwise find the latest tag that starts with v and strip off the v + # Otherwise find the latest tag that starts with v LAST_TAG=$(git describe --tags --match "v*" --abbrev=0 2>/dev/null || echo "v0.0.0") # Compute a build number based on number of commits since that tag COMMITS_SINCE_TAG=$(git rev-list ${LAST_TAG}..HEAD --count) - # Final version: X.Y.Z + # Final version: X.Y.Z (stripped off the v) Version="${LAST_TAG#v}.${COMMITS_SINCE_TAG}" echo "version=$Version" >> $GITHUB_OUTPUT echo "no tag push; using $Version" @@ -70,7 +70,7 @@ jobs: run: msbuild build\SayMore.proj /t:Build /p:Configuration=$env:Configuration /p:Version=$env:Version /m - name: Run tests - run: msbuild build\SayMore.proj /t:Test /p:Configuration=$env:Configuration /p:useNUnit-x86=true /p:excludedCategories=SkipOnCI /m + run: msbuild build\SayMore.proj /t:Test /p:Configuration=$env:Configuration /p:useNUnit-x86=true /m - name: Upload test results if: always() From 324c56fd323db269580d07862ef74f7e7759ae8c Mon Sep 17 00:00:00 2001 From: Christopher Hirt Date: Mon, 3 Nov 2025 21:20:54 -0500 Subject: [PATCH 03/17] Indentation suggestions Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/build-test-installer-release.yml | 2 +- build/SayMore.proj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index cf6834492..5f6661d36 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -45,7 +45,7 @@ jobs: fi # Otherwise find the latest tag that starts with v - LAST_TAG=$(git describe --tags --match "v*" --abbrev=0 2>/dev/null || echo "v0.0.0") + LAST_TAG=$(git describe --tags --match "v*" --abbrev=0 2>/dev/null || echo "v0.0.0") # Compute a build number based on number of commits since that tag COMMITS_SINCE_TAG=$(git rev-list ${LAST_TAG}..HEAD --count) diff --git a/build/SayMore.proj b/build/SayMore.proj index c3ebe5f6d..d2616f906 100644 --- a/build/SayMore.proj +++ b/build/SayMore.proj @@ -36,7 +36,7 @@ 1.0.0.0 - + From 09f10e690c63d7c4d3bff810556825edaa8121dd Mon Sep 17 00:00:00 2001 From: Christopher Hirt Date: Mon, 3 Nov 2025 21:30:14 -0500 Subject: [PATCH 04/17] remove infinite CI loop in media tests --- .../MediaUtils/MPlayer/MediaPlayerViewModelTests.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/SayMoreTests/MediaUtils/MPlayer/MediaPlayerViewModelTests.cs b/src/SayMoreTests/MediaUtils/MPlayer/MediaPlayerViewModelTests.cs index 44e59bf40..4a9b4b3b3 100644 --- a/src/SayMoreTests/MediaUtils/MPlayer/MediaPlayerViewModelTests.cs +++ b/src/SayMoreTests/MediaUtils/MPlayer/MediaPlayerViewModelTests.cs @@ -252,8 +252,7 @@ public void LoadAndPlayFile_FileNameHasAsciiCharacter_Plays() File.Delete(pathname); }; _model.Play(); - while (_model != null) - Thread.Sleep(10); + Thread.Sleep(3); Assert.IsTrue(logger.GetText().Contains("Starting playback...")); } @@ -276,8 +275,7 @@ public void LoadAndPlayFile_FileNameHasNonAsciiCharacter_Plays() File.Delete(pathname); }; _model.Play(); - while (_model != null) - Thread.Sleep(10); + Thread.Sleep(3); Assert.IsTrue(logger.GetText().Contains("Starting playback...")); } @@ -305,8 +303,7 @@ public void LoadAndPlayFile_FolderHasNonAsciiCharacter_Plays() File.Delete(pathname); }; _model.Play(); - while (_model != null) - Thread.Sleep(10); + Thread.Sleep(3); Assert.IsTrue(logger.GetText().Contains("Starting playback...")); } } From 7813f18bf6f5da2a7c794c579ec5f353448dee29 Mon Sep 17 00:00:00 2001 From: Chris Hirt Date: Mon, 3 Nov 2025 21:45:37 -0500 Subject: [PATCH 05/17] exclude tests marked skipOnCI --- .github/workflows/build-test-installer-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index 5f6661d36..d2e523434 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -70,7 +70,7 @@ jobs: run: msbuild build\SayMore.proj /t:Build /p:Configuration=$env:Configuration /p:Version=$env:Version /m - name: Run tests - run: msbuild build\SayMore.proj /t:Test /p:Configuration=$env:Configuration /p:useNUnit-x86=true /m + run: msbuild build\SayMore.proj /t:Test /p:Configuration=$env:Configuration /p:useNUnit-x86=true /p:excludedCategories=SkipOnCI /m - name: Upload test results if: always() From 6718bf2edaf570a00cccb23c029a12b5e1521f83 Mon Sep 17 00:00:00 2001 From: Christopher Hirt Date: Tue, 4 Nov 2025 17:18:28 -0500 Subject: [PATCH 06/17] remove unnecessary flag --- .github/workflows/build-test-installer-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index d2e523434..fb39f4c60 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -110,7 +110,7 @@ jobs: vs-version: '[17.0,18.0)' - name: Build installer - run: msbuild build\SayMore.proj /t:Installer /p:Configuration=$env:Configuration /p:useNUnit-x86=true /p:Version=$env:Version /m + run: msbuild build\SayMore.proj /t:Installer /p:Configuration=$env:Configuration /p:Version=$env:Version /m - name: Sign installer if: ${{ github.event_name != 'pull_request' }} From 938bc0772931580c76267831c8577d6048193b76 Mon Sep 17 00:00:00 2001 From: Christopher Hirt Date: Tue, 4 Nov 2025 18:32:58 -0500 Subject: [PATCH 07/17] add saymore-docs as submodule Also update workflow to copy chm file to DistFiles as the installer expects --- .github/workflows/build-test-installer-release.yml | 5 ++--- .gitmodules | 3 +++ docs | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .gitmodules create mode 160000 docs diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index fb39f4c60..eb5895131 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -100,9 +100,8 @@ jobs: - name: Restore NuGet packages run: nuget restore SayMore.sln - - name: Fetch documentation artifacts - shell: bash - run: build/getDependencies-windows.sh + - name: Copy CHM file into DistFiles + run: copy "docs\SayMoreHelp.chm" "DistFiles\SayMoreHelp.chm" - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..fa5bcc276 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "docs"] + path = docs + url = https://github.com/sillsdev/saymore-doc.git diff --git a/docs b/docs new file mode 160000 index 000000000..68cafb8dd --- /dev/null +++ b/docs @@ -0,0 +1 @@ +Subproject commit 68cafb8dd8fb32e3efaf13b7ce5563355d6342ca From edf41d4102c5b9186033aca2186ec7db5d6654db Mon Sep 17 00:00:00 2001 From: Christopher Hirt Date: Tue, 4 Nov 2025 18:36:22 -0500 Subject: [PATCH 08/17] checkout submodules in workflow --- .github/workflows/build-test-installer-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index eb5895131..c0d690615 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -29,7 +29,7 @@ jobs: - name: Checkout uses: actions/checkout@v5 with: - fetch-depth: 0 + submodules: true - name: Compute Version id: compute_version @@ -92,7 +92,7 @@ jobs: - name: Checkout uses: actions/checkout@v5 with: - fetch-depth: 0 + submodules: true - name: Setup NuGet uses: NuGet/setup-nuget@v2 From 2904084ca3fcd8c67913c4689d8df0d5dc143e56 Mon Sep 17 00:00:00 2001 From: Christopher Hirt Date: Tue, 4 Nov 2025 18:43:57 -0500 Subject: [PATCH 09/17] publish HTML release notes --- .github/workflows/build-test-installer-release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index c0d690615..0eced9651 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -108,6 +108,10 @@ jobs: with: vs-version: '[17.0,18.0)' + # Build release notes in HTML (this could be replaced with GitHub release notes later) + - name: Create HTML release notes + run: msbuild build\SayMore.proj /t:ConvertReleaseNotesToHtml /p:Version=$env:Version /m + - name: Build installer run: msbuild build\SayMore.proj /t:Installer /p:Configuration=$env:Configuration /p:Version=$env:Version /m @@ -129,6 +133,7 @@ jobs: output/installer/*.download_info output/installer/appcast.xml output/releasenotes.download_info + output/ReleaseNotes.htm - name: Create release if: ${{ startsWith(github.ref, 'refs/tags/v') }} @@ -139,5 +144,6 @@ jobs: output/installer/*.download_info output/installer/appcast.xml output/releasenotes.download_info + output/ReleaseNotes.htm draft: true generate_release_notes: true From 176802edd7b8772546108272e6bb741e6b4f5c67 Mon Sep 17 00:00:00 2001 From: Christopher Hirt Date: Tue, 4 Nov 2025 18:55:11 -0500 Subject: [PATCH 10/17] explicitly fetch tags --- .github/workflows/build-test-installer-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index 0eced9651..6ea301db1 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -30,6 +30,7 @@ jobs: uses: actions/checkout@v5 with: submodules: true + fetch-tags: true - name: Compute Version id: compute_version From 1bfd18806945932c57d4393d9873c7b157c85366 Mon Sep 17 00:00:00 2001 From: Christopher Hirt Date: Tue, 4 Nov 2025 18:56:35 -0500 Subject: [PATCH 11/17] try working directory --- .github/workflows/build-test-installer-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index 6ea301db1..cd31e848f 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -30,10 +30,10 @@ jobs: uses: actions/checkout@v5 with: submodules: true - fetch-tags: true - name: Compute Version id: compute_version + working-directory: . shell: bash run: | # If this is a tag push and it starts with v, just use it and strip off the v From 8e2db2958b735aff8f6a689d8268fad606a5b452 Mon Sep 17 00:00:00 2001 From: Christopher Hirt Date: Tue, 4 Nov 2025 19:00:57 -0500 Subject: [PATCH 12/17] pwd --- .github/workflows/build-test-installer-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index cd31e848f..c1b358459 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -33,9 +33,10 @@ jobs: - name: Compute Version id: compute_version - working-directory: . + #working-directory: ${{ github.workspace }} shell: bash run: | + pwd # If this is a tag push and it starts with v, just use it and strip off the v if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then Version="${GITHUB_REF#refs/tags/}" From 6e5f7351f8bd6904f6f9e6d144851ef200cdf3da Mon Sep 17 00:00:00 2001 From: Christopher Hirt Date: Tue, 4 Nov 2025 19:03:09 -0500 Subject: [PATCH 13/17] git describe --- .github/workflows/build-test-installer-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index c1b358459..95bcac05c 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -36,7 +36,7 @@ jobs: #working-directory: ${{ github.workspace }} shell: bash run: | - pwd + git describe --tags --match "v*" --abbrev=0 # If this is a tag push and it starts with v, just use it and strip off the v if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then Version="${GITHUB_REF#refs/tags/}" From d79304d55df6fafce32ace7cee67ebbea1dec1af Mon Sep 17 00:00:00 2001 From: Christopher Hirt Date: Tue, 4 Nov 2025 19:06:15 -0500 Subject: [PATCH 14/17] fetch tags --- .github/workflows/build-test-installer-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index 95bcac05c..22706ce71 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -29,6 +29,7 @@ jobs: - name: Checkout uses: actions/checkout@v5 with: + fetch-tags: true submodules: true - name: Compute Version From e22dc320a985d4f9244f7d9d7a769fb12b11758f Mon Sep 17 00:00:00 2001 From: Christopher Hirt Date: Tue, 4 Nov 2025 19:11:17 -0500 Subject: [PATCH 15/17] Ensure workflows fetch full history for versioning --- .github/workflows/build-test-installer-release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index 22706ce71..f544ef0ab 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -30,6 +30,7 @@ jobs: uses: actions/checkout@v5 with: fetch-tags: true + fetch-depth: 0 submodules: true - name: Compute Version @@ -37,7 +38,7 @@ jobs: #working-directory: ${{ github.workspace }} shell: bash run: | - git describe --tags --match "v*" --abbrev=0 + git describe --tags --match "v*" --abbrev=0 || echo "No existing tag found" # If this is a tag push and it starts with v, just use it and strip off the v if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then Version="${GITHUB_REF#refs/tags/}" @@ -95,6 +96,7 @@ jobs: - name: Checkout uses: actions/checkout@v5 with: + fetch-depth: 0 submodules: true - name: Setup NuGet From c2a324b5df4e02c45f40fcdec9a67b5fe461f561 Mon Sep 17 00:00:00 2001 From: Chris Hirt Date: Tue, 4 Nov 2025 20:41:07 -0500 Subject: [PATCH 16/17] fix CHM filename --- .github/workflows/build-test-installer-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index f544ef0ab..f59771c42 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -106,7 +106,7 @@ jobs: run: nuget restore SayMore.sln - name: Copy CHM file into DistFiles - run: copy "docs\SayMoreHelp.chm" "DistFiles\SayMoreHelp.chm" + run: copy "docs\SayMore.chm" "DistFiles\SayMore.chm" - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 From ed7a1cb5b2baab2f259efef416632a4b9d89dd3e Mon Sep 17 00:00:00 2001 From: Christopher Hirt Date: Tue, 4 Nov 2025 21:01:12 -0500 Subject: [PATCH 17/17] fold workflow into single job --- .../build-test-installer-release.yml | 48 +++++++------------ 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index f59771c42..be990ae06 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -14,13 +14,15 @@ on: permissions: contents: write id-token: write + actions: read + checks: write env: Configuration: Release jobs: build_test: - name: Build and test + name: Build Test Installer Release runs-on: windows-latest outputs: version: ${{ steps.compute_version.outputs.version }} @@ -70,10 +72,10 @@ jobs: with: vs-version: '[17.0,18.0)' - - name: Build solution + - name: Build run: msbuild build\SayMore.proj /t:Build /p:Configuration=$env:Configuration /p:Version=$env:Version /m - - name: Run tests + - name: Run Tests run: msbuild build\SayMore.proj /t:Test /p:Configuration=$env:Configuration /p:useNUnit-x86=true /p:excludedCategories=SkipOnCI /m - name: Upload test results @@ -84,40 +86,14 @@ jobs: if-no-files-found: warn path: output/${{ env.Configuration }}/TestResults.xml - build_installer: - name: Build installer, sign, and publish artifacts - needs: build_test - if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))) }} - runs-on: windows-latest - env: - Version: ${{ needs.build_test.outputs.version }} - - steps: - - name: Checkout - uses: actions/checkout@v5 - with: - fetch-depth: 0 - submodules: true - - - name: Setup NuGet - uses: NuGet/setup-nuget@v2 - - - name: Restore NuGet packages - run: nuget restore SayMore.sln - - name: Copy CHM file into DistFiles run: copy "docs\SayMore.chm" "DistFiles\SayMore.chm" - - name: Setup MSBuild - uses: microsoft/setup-msbuild@v2 - with: - vs-version: '[17.0,18.0)' - - # Build release notes in HTML (this could be replaced with GitHub release notes later) - name: Create HTML release notes run: msbuild build\SayMore.proj /t:ConvertReleaseNotesToHtml /p:Version=$env:Version /m - name: Build installer + if: ${{ github.event_name != 'pull_request' }} run: msbuild build\SayMore.proj /t:Installer /p:Configuration=$env:Configuration /p:Version=$env:Version /m - name: Sign installer @@ -129,6 +105,7 @@ jobs: files-folder-filter: SayMoreInstaller*.msi - name: Upload installer artifacts + if: ${{ github.event_name != 'pull_request' }} uses: actions/upload-artifact@v4 with: name: saymore-installer @@ -152,3 +129,14 @@ jobs: output/ReleaseNotes.htm draft: true generate_release_notes: true + report: + name: Test Report + needs: build_test + runs-on: ubuntu-latest + steps: + - uses: dorny/test-reporter@v2 + with: + artifact: saymore-test-results + name: NUnit Tests + path: '*.xml' + reporter: dotnet-nunit \ No newline at end of file