diff --git a/.github/templates/test.lib.yml b/.github/templates/test.lib.yml index e3df7d41e8..719b8b42de 100644 --- a/.github/templates/test.lib.yml +++ b/.github/templates/test.lib.yml @@ -2,7 +2,7 @@ #@ load("common.lib.yml", "actionDownloadArtifact", "msbuild", "dotnetPublish", "fetchWrapperBinaries", "checkoutCode", "fetchPackageArtifacts") #@ def baasTestArgs(differentiator): -#@ return " --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=" + differentiator +#@ return " --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=" + differentiator + "-${{ github.run_id }}-${{ github.run_attempt }}" #@ end --- #@ def publishTestsResults(files, test_title): @@ -86,7 +86,7 @@ env: env: apiKey: ${{ secrets.BaaSaasApiKey }} if: ${{ env.apiKey }} - run: #@ "dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=" + differentiator + run: #@ "dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=" + differentiator + "-${{ github.run_id }}-${{ github.run_attempt }}" working-directory: Tools/DeployApps #@ end #@ end \ No newline at end of file diff --git a/.github/workflows/cleanup-baas.yml b/.github/workflows/cleanup-baas.yml index c6b5153104..2237b54bd4 100755 --- a/.github/workflows/cleanup-baas.yml +++ b/.github/workflows/cleanup-baas.yml @@ -29,5 +29,5 @@ jobs: with: dotnet-version: 6.0.x - name: Terminate Baas - run: dotnet run terminate-baas --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=${{ matrix.differentiator }} + run: dotnet run terminate-baas --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=${{ matrix.differentiator }}-${{ github.run_id }}-${{ github.run_attempt }} working-directory: Tools/DeployApps \ No newline at end of file diff --git a/.github/workflows/deploy-baas.yml b/.github/workflows/deploy-baas.yml index 8e81913c1a..e1ff8b7431 100755 --- a/.github/workflows/deploy-baas.yml +++ b/.github/workflows/deploy-baas.yml @@ -29,5 +29,5 @@ jobs: with: dotnet-version: 6.0.x - name: Deploy Apps - run: dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=${{ matrix.differentiator }} + run: dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=${{ matrix.differentiator }}-${{ github.run_id }}-${{ github.run_attempt }} working-directory: Tools/DeployApps \ No newline at end of file diff --git a/.github/workflows/test-android.yml b/.github/workflows/test-android.yml index 967ceb6431..bc85c7912c 100755 --- a/.github/workflows/test-android.yml +++ b/.github/workflows/test-android.yml @@ -53,7 +53,7 @@ jobs: env: apiKey: ${{ secrets.BaaSaasApiKey }} if: ${{ env.apiKey }} - run: dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=android + run: dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=android-${{ github.run_id }}-${{ github.run_attempt }} working-directory: Tools/DeployApps - name: Add msbuild to PATH uses: microsoft/setup-msbuild@0b44c6745b7e81956596964100aadb92d667c497 @@ -74,7 +74,7 @@ jobs: app-id: io.realm.xamarintests project-arn: ${{ secrets.DEVICEFARM_PROJECT_ARN }} device-pool-arn: ${{ secrets.DEVICEFARM_ANDROID_POOL_ARN }} - arguments: ' --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=android' + arguments: ' --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=android-${{ github.run_id }}-${{ github.run_attempt }}' - name: Publish Unit Test Results uses: LaPeste/test-reporter@510caf50a955b1003bec48a6494be4d6537f3a0b if: always() diff --git a/.github/workflows/test-code-coverage.yml b/.github/workflows/test-code-coverage.yml index f5b4105f18..762397a5cc 100755 --- a/.github/workflows/test-code-coverage.yml +++ b/.github/workflows/test-code-coverage.yml @@ -130,7 +130,7 @@ jobs: env: apiKey: ${{ secrets.BaaSaasApiKey }} if: ${{ env.apiKey }} - run: dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=code-coverage + run: dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=code-coverage-${{ github.run_id }}-${{ github.run_attempt }} working-directory: Tools/DeployApps - name: Setup Coverlet & Report Generator run: | @@ -147,7 +147,7 @@ jobs: env: DOTNET_DbgEnableMiniDump: 1 DOTNET_EnableCrashReport: 1 - run: ./tools/coverlet ${{ steps.dotnet-publish.outputs.executable-path }} -t ${{ steps.dotnet-publish.outputs.executable-path }}/Realm.Tests -a '--result=TestResults.Linux.xml --labels=After --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=code-coverage' -f lcov -o ./report.lcov --exclude '[Realm.Tests]*' --exclude '[Realm.Fody]*' --exclude '[Realm.PlatformHelpers]*' + run: ./tools/coverlet ${{ steps.dotnet-publish.outputs.executable-path }} -t ${{ steps.dotnet-publish.outputs.executable-path }}/Realm.Tests -a '--result=TestResults.Linux.xml --labels=After --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=code-coverage-${{ github.run_id }}-${{ github.run_attempt }}' -f lcov -o ./report.lcov --exclude '[Realm.Tests]*' --exclude '[Realm.Fody]*' --exclude '[Realm.PlatformHelpers]*' - name: Archive core dump uses: actions/upload-artifact@v3 if: failure() diff --git a/.github/workflows/test-ios.yml b/.github/workflows/test-ios.yml index 340c947dc8..8d621c221b 100755 --- a/.github/workflows/test-ios.yml +++ b/.github/workflows/test-ios.yml @@ -40,7 +40,7 @@ jobs: env: apiKey: ${{ secrets.BaaSaasApiKey }} if: ${{ env.apiKey }} - run: dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=ios + run: dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=ios-${{ github.run_id }}-${{ github.run_attempt }} working-directory: Tools/DeployApps - name: Add msbuild to PATH uses: microsoft/setup-msbuild@0b44c6745b7e81956596964100aadb92d667c497 @@ -53,7 +53,7 @@ jobs: appPath: Tests/Tests.iOS/bin/iPhoneSimulator/Release/Tests.iOS.app bundleId: io.realm.dotnettests iphoneToSimulate: iPhone-8 - arguments: --headless --result=${{ github.workspace }}/TestResults.iOS.xml --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=ios + arguments: --headless --result=${{ github.workspace }}/TestResults.iOS.xml --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=ios-${{ github.run_id }}-${{ github.run_attempt }} - name: Publish Unit Test Results uses: LaPeste/test-reporter@510caf50a955b1003bec48a6494be4d6537f3a0b if: always() diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index 201d1c26cc..c7d3b955ad 100755 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -40,7 +40,7 @@ jobs: env: apiKey: ${{ secrets.BaaSaasApiKey }} if: ${{ env.apiKey }} - run: dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=xamarinmacos + run: dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=xamarinmacos-${{ github.run_id }}-${{ github.run_attempt }} working-directory: Tools/DeployApps - name: Add msbuild to PATH uses: microsoft/setup-msbuild@0b44c6745b7e81956596964100aadb92d667c497 @@ -48,7 +48,7 @@ jobs: - name: Build Tests/Tests.XamarinMac run: msbuild Tests/Tests.XamarinMac -p:Configuration=Release -restore -p:RestoreConfigFile=Tests/Test.NuGet.Config -p:UseRealmNupkgsWithVersion=${{ inputs.version }} - name: Run the tests - run: Tests/Tests.XamarinMac/bin/Release/Tests.XamarinMac.app/Contents/MacOS/Tests.XamarinMac --headless --result=${{ github.workspace }}/TestResults.XamarinMac.xml --labels=All --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=xamarinmacos + run: Tests/Tests.XamarinMac/bin/Release/Tests.XamarinMac.app/Contents/MacOS/Tests.XamarinMac --headless --result=${{ github.workspace }}/TestResults.XamarinMac.xml --labels=All --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=xamarinmacos-${{ github.run_id }}-${{ github.run_attempt }} - name: Publish Unit Test Results uses: LaPeste/test-reporter@510caf50a955b1003bec48a6494be4d6537f3a0b if: always() @@ -93,7 +93,7 @@ jobs: - name: Build the tests run: dotnet build Tests/Tests.Maui -c Release -f net6.0-maccatalyst -p:RestoreConfigFile=Tests/Test.NuGet.Config -p:UseRealmNupkgsWithVersion=${{ inputs.version }} - name: Run the tests - run: Tests/Tests.Maui/bin/Release/net6.0-maccatalyst/maccatalyst-x64/Tests.Maui.app/Contents/MacOS/Tests.Maui --headless --result=${{ github.workspace }}/TestResults.MacCatalyst.xml --labels=All --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=maccatalyst + run: Tests/Tests.Maui/bin/Release/net6.0-maccatalyst/maccatalyst-x64/Tests.Maui.app/Contents/MacOS/Tests.Maui --headless --result=${{ github.workspace }}/TestResults.MacCatalyst.xml --labels=All --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=maccatalyst-${{ github.run_id }}-${{ github.run_attempt }} - name: Publish Unit Test Results uses: LaPeste/test-reporter@510caf50a955b1003bec48a6494be4d6537f3a0b if: always() diff --git a/.github/workflows/test-net-framework.yml b/.github/workflows/test-net-framework.yml index 8c80f19921..6efd8f8e08 100755 --- a/.github/workflows/test-net-framework.yml +++ b/.github/workflows/test-net-framework.yml @@ -40,7 +40,7 @@ jobs: env: apiKey: ${{ secrets.BaaSaasApiKey }} if: ${{ env.apiKey }} - run: dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=net-framework + run: dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=net-framework-${{ github.run_id }}-${{ github.run_attempt }} working-directory: Tools/DeployApps - name: Add msbuild to PATH uses: microsoft/setup-msbuild@0b44c6745b7e81956596964100aadb92d667c497 @@ -48,7 +48,7 @@ jobs: - name: Build Tests/Realm.Tests run: msbuild Tests/Realm.Tests -p:Configuration=Release -restore -p:RestoreConfigFile=Tests/Test.NuGet.Config -p:UseRealmNupkgsWithVersion=${{ inputs.version }} -p:TargetFramework=net461 -p:RealmTestsStandaloneExe=true - name: Run the tests - run: ./Tests/Realm.Tests/bin/Release/net461/Realm.Tests.exe --result=TestResults.Windows.xml --labels=After --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=net-framework + run: ./Tests/Realm.Tests/bin/Release/net461/Realm.Tests.exe --result=TestResults.Windows.xml --labels=After --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=net-framework-${{ github.run_id }}-${{ github.run_attempt }} - name: Publish Unit Test Results uses: LaPeste/test-reporter@510caf50a955b1003bec48a6494be4d6537f3a0b if: always() diff --git a/.github/workflows/test-tvos.yml b/.github/workflows/test-tvos.yml index ff14b7aefc..d7463ab641 100755 --- a/.github/workflows/test-tvos.yml +++ b/.github/workflows/test-tvos.yml @@ -47,7 +47,7 @@ jobs: appPath: Tests/Tests.XamarinTVOS/bin/iPhoneSimulator/Release/Tests.XamarinTVOS.app bundleId: io.realm.Tests-XamarinTVOS iphoneToSimulate: Apple-TV-1080p - arguments: --headless --result=${{ github.workspace }}/TestResults.tvOS.xml --labels=All --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=tvos + arguments: --headless --result=${{ github.workspace }}/TestResults.tvOS.xml --labels=All --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=tvos-${{ github.run_id }}-${{ github.run_attempt }} os: tvOS - name: Publish Unit Test Results uses: LaPeste/test-reporter@510caf50a955b1003bec48a6494be4d6537f3a0b diff --git a/.github/workflows/test-uwp-managed.yml b/.github/workflows/test-uwp-managed.yml index 64d13db9f3..69ad6ad743 100755 --- a/.github/workflows/test-uwp-managed.yml +++ b/.github/workflows/test-uwp-managed.yml @@ -44,7 +44,7 @@ jobs: env: apiKey: ${{ secrets.BaaSaasApiKey }} if: ${{ env.apiKey }} - run: dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=uwp-managed + run: dotnet run deploy-apps --baasaas-api-key=${{ secrets.BaaSaasApiKey }} --baas-differentiator=uwp-managed-${{ github.run_id }}-${{ github.run_attempt }} working-directory: Tools/DeployApps - name: Import test certificate run: | @@ -59,7 +59,7 @@ jobs: - name: Build Tests/Tests.UWP run: msbuild Tests/Tests.UWP -p:Configuration=Release -restore -p:RestoreConfigFile=Tests/Test.NuGet.Config -p:UseRealmNupkgsWithVersion=${{ inputs.version }} -p:AppxBundle=Always -p:PackageCertificateKeyFile=${{ github.workspace }}\Tests\Tests.UWP\Tests.UWP_TemporaryKey.pfx -p:PackageCertificatePassword="${{ secrets.Pfx_Password }}" -p:UseDotNetNativeToolchain=false -p:AppxBundlePlatforms=x64 - name: Run the tests - run: ./Tests/Tests.UWP/RunTests.ps1 -ExtraAppArgs ' --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=uwp-managed' + run: ./Tests/Tests.UWP/RunTests.ps1 -ExtraAppArgs ' --baasaas-api-key=${{ secrets.BaaSaasApiKey}} --baas-differentiator=uwp-managed-${{ github.run_id }}-${{ github.run_attempt }}' shell: powershell - name: Publish Unit Test Results uses: LaPeste/test-reporter@510caf50a955b1003bec48a6494be4d6537f3a0b