From 8f55f6c3bee459ab5a2d729f9c8602c2327a624c Mon Sep 17 00:00:00 2001 From: Zxilly Date: Thu, 25 Jul 2024 16:50:04 +0800 Subject: [PATCH] test: update key in tests --- __tests__/cache-restore.test.ts | 4 ++-- externals/install-dotnet.sh | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/__tests__/cache-restore.test.ts b/__tests__/cache-restore.test.ts index ab25a7233e..19f487413d 100644 --- a/__tests__/cache-restore.test.ts +++ b/__tests__/cache-restore.test.ts @@ -50,7 +50,7 @@ describe('cache-restore tests', () => { await restoreCache(lockFilePattern); - const expectedKey = `dotnet-cache-${process.env.RUNNER_OS}-hash`; + const expectedKey = `dotnet-cache-${process.env.RUNNER_OS}-${process.arch}-hash`; expect(jest.mocked(core.saveState)).toHaveBeenCalledWith( 'CACHE_KEY', expectedKey @@ -66,7 +66,7 @@ describe('cache-restore tests', () => { }); it('calls core.saveState("CACHE_RESULT") when cache.restoreCache() returns key', async () => { - const expectedKey = `dotnet-cache-${process.env.RUNNER_OS}-hash`; + const expectedKey = `dotnet-cache-${process.env.RUNNER_OS}-${process.arch}-hash`; jest.mocked(glob.hashFiles).mockResolvedValue('hash'); jest.mocked(cache.restoreCache).mockResolvedValue(expectedKey); diff --git a/externals/install-dotnet.sh b/externals/install-dotnet.sh index 42c201af4c..caa3ea4509 100755 --- a/externals/install-dotnet.sh +++ b/externals/install-dotnet.sh @@ -327,6 +327,10 @@ get_machine_architecture() { echo "loongarch64" return 0 ;; + riscv64) + echo "riscv64" + return 0 + ;; esac fi