Skip to content

Commit

Permalink
Fix nuget errors on self-hosted runnners (#3546)
Browse files Browse the repository at this point in the history
* Fix nuget errors on self-hosted runnners

* Correction

* Corrected condition
  • Loading branch information
papafe authored Mar 7, 2024
1 parent 3a7beef commit 5d81e87
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/templates/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ jobs:
- #@ template.replace(cleanupWorkspace())
- #@ template.replace(checkoutCode())
- #@ template.replace(fetchPackageArtifacts("needs.build-packages.outputs.package_version"))
#! To avoid NU5037 error
- name: Clear nuget cache
run: dotnet nuget locals all --clear
- #@ template.replace(dotnetBuildTests("Tests/Benchmarks/PerformanceTests", "net6.0", "linux-x64", "needs.build-packages.outputs.package_version"))
- name: Run the tests
run: #@ "${{ steps.dotnet-publish.outputs.executable-path }}/PerformanceTests -f \"*\" --join"
Expand Down
4 changes: 4 additions & 0 deletions .github/templates/test-net-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ jobs:

steps:
- #@ template.replace(prepareTest(cleanupWorkspace = True))
#! To avoid NU5037 error
- name: Clear nuget cache
run: dotnet nuget locals all --clear
if: ${{ matrix.os.runner == 'win81' }}
- #@ template.replace(dotnetBuildTests("Tests/Realm.Tests", "${{ matrix.framework }}", "${{ matrix.os.runtime }}"))
- name: Run the tests
env:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ jobs:
with:
name: Realm.${{ needs.build-packages.outputs.package_version }}
path: ${{ github.workspace }}/Realm/packages/
- name: Clear nuget cache
run: dotnet nuget locals all --clear
- name: Publish Tests/Benchmarks/PerformanceTests
run: dotnet publish Tests/Benchmarks/PerformanceTests -c Release -f net6.0 -r linux-x64 -p:RestoreConfigFile=Tests/Test.NuGet.Config -p:UseRealmNupkgsWithVersion=${{ needs.build-packages.outputs.package_version }} -p:RealmTestsStandaloneExe=true --no-self-contained
- name: Output executable path
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-net-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ jobs:
with:
name: Realm.${{ inputs.version }}
path: ${{ github.workspace }}/Realm/packages/
- name: Clear nuget cache
run: dotnet nuget locals all --clear
if: ${{ matrix.os.runner == 'win81' }}
- name: Publish Tests/Realm.Tests
run: dotnet publish Tests/Realm.Tests -c Release -f ${{ matrix.framework }} -r ${{ matrix.os.runtime }} -p:RestoreConfigFile=Tests/Test.NuGet.Config -p:UseRealmNupkgsWithVersion=${{ inputs.version }} -p:RealmTestsStandaloneExe=true --no-self-contained
- name: Output executable path
Expand Down

0 comments on commit 5d81e87

Please sign in to comment.