Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RNET-1122] Added run_id and run_attempt to differentiator on CI #3554

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/templates/test.lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/cleanup-baas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/deploy-baas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/test-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ 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
if: ${{ runner.os == 'Windows' }}
- 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()
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-net-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ 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
if: ${{ runner.os == 'Windows' }}
- 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()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-tvos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-uwp-managed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand Down
Loading