Skip to content

Commit

Permalink
Run .NET core tests on Win81 (#2580)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev committed Aug 27, 2021
1 parent c24367e commit 7cfff06
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/templates/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,20 @@ jobs:
include-prerelease: true
- #@ template.replace(dotnetPublishAndRunTests("Tests/Realm.Tests", "${{ matrix.targetFramework }}", "Realm.Tests --result=TestResults.xml --labels=After"))
- #@ publishTestsResults("TestResults.xml", ".NET (${{ matrix.os }}, ${{ matrix.targetFramework }})")
#! This should be folded in run-tests-netcore once we fix the TLS issues on win81
run-tests-netcore-win81:
name: Test .NET on Win81
needs: build-packages
runs-on: win81
strategy:
fail-fast: false
matrix:
targetFramework: [ netcoreapp3.1, net5.0 ]
steps:
- #@ template.replace(checkoutCode())
- #@ template.replace(fetchPackageArtifacts())
- #@ template.replace(dotnetPublishAndRunTests("Tests/Realm.Tests", "${{ matrix.targetFramework }}", "Realm.Tests --result=TestResults.xml --labels=After"))
- #@ publishTestsResults("TestResults.xml", ".NET (win81, ${{ matrix.targetFramework }})")
run-tests-xamarin-macos:
runs-on: macos-latest
name: Test Xamarin.macOS
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,53 @@ jobs:
files: TestResults.xml
comment_mode: "off"
check_name: Results .NET (${{ matrix.os }}, ${{ matrix.targetFramework }})
run-tests-netcore-win81:
name: Test .NET on Win81
needs: build-packages
runs-on: win81
strategy:
fail-fast: false
matrix:
targetFramework:
- netcoreapp3.1
- net5.0
steps:
- name: Disable Analytics
run: |
echo "REALM_DISABLE_ANALYTICS=true" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: false
ref: ${{ github.event.pull_request.head.sha }}
- name: Register csc problem matcher
run: echo "::add-matcher::.github/problem-matchers/csc.json"
- name: Register msvc problem matcher
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
- name: Fetch Realm
uses: actions/download-artifact@v2
with:
name: Realm.${{ needs.build-packages.outputs.package_version }}
path: ${{ github.workspace }}/Realm/packages/
- name: Fetch Realm.Fody
uses: actions/download-artifact@v2
with:
name: Realm.Fody.${{ needs.build-packages.outputs.package_version }}
path: ${{ github.workspace }}/Realm/packages/
- name: Publish Tests/Realm.Tests
run: dotnet publish Tests/Realm.Tests -c Release -f ${{ matrix.targetFramework }} -r ${{ (runner.os == 'macOS' && 'osx-x64') || (runner.os == 'Windows' && 'win-x64') || (runner.os == 'Linux' && 'linux-x64') || '???' }} -p:AdditionalFrameworks=${{ matrix.targetFramework }} -p:RestoreConfigFile=Tests/Test.NuGet.Config -p:UseRealmNupkgsWithVersion=${{ needs.build-packages.outputs.package_version }} --no-self-contained
- name: Output executable path
id: dotnet-publish
run: echo '::set-output name=executable-path::./Tests/Realm.Tests/bin/Release/${{ matrix.targetFramework }}/${{ (runner.os == 'macOS' && 'osx-x64') || (runner.os == 'Windows' && 'win-x64') || (runner.os == 'Linux' && 'linux-x64') || '???' }}'
- name: Run the tests
run: ${{ steps.dotnet-publish.outputs.executable-path }}/Realm.Tests --result=TestResults.xml --labels=After
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v1
if: always()
with:
files: TestResults.xml
comment_mode: "off"
check_name: Results .NET (win81, ${{ matrix.targetFramework }})
run-tests-xamarin-macos:
runs-on: macos-latest
name: Test Xamarin.macOS
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* Started tracking package and wrapper sizes over time. (Issue [#2225](https://github.com/realm/realm-dotnet/issues/2225))
* Removed the `[Serializable]` attribute from RealmObjectBase as `BinarySerializer` is now obsolete. (PR [#2578](https://github.com/realm/realm-dotnet/pull/2578))
* Added code coverage job to Github Actions. (PR [#2581](https://github.com/realm/realm-dotnet/pull/2581))
* Added CI tests running on Windows 8.1 . (PR [#2580](https://github.com/realm/realm-dotnet/pull/2580))

## 10.3.0 (2021-07-07)

Expand Down

0 comments on commit 7cfff06

Please sign in to comment.