Skip to content

Commit

Permalink
test: update key in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zxilly committed Jul 25, 2024
1 parent 13a76d3 commit 8f55f6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __tests__/cache-restore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);

Expand Down
4 changes: 4 additions & 0 deletions externals/install-dotnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@ get_machine_architecture() {
echo "loongarch64"
return 0
;;
riscv64)
echo "riscv64"
return 0
;;
esac
fi

Expand Down

0 comments on commit 8f55f6c

Please sign in to comment.