From f586867fa186b94215d6e0831b9ebd7d934cb979 Mon Sep 17 00:00:00 2001 From: soul-walker Date: Wed, 20 Mar 2024 20:42:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8B=E8=BD=BD=E6=96=87?= =?UTF-8?q?=E4=BB=B6arch=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __tests__/wait.test.ts | 25 ------------------------- dist/index.js | Bin 3456970 -> 3456843 bytes src/install.ts | 3 ++- src/main.ts | 16 ++++++---------- 4 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 __tests__/wait.test.ts diff --git a/__tests__/wait.test.ts b/__tests__/wait.test.ts deleted file mode 100644 index 1336aaa..0000000 --- a/__tests__/wait.test.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Unit tests for src/wait.ts - */ - -import { wait } from '../src/wait' -import { expect } from '@jest/globals' - -describe('wait.ts', () => { - it('throws an invalid number', async () => { - const input = parseInt('foo', 10) - expect(isNaN(input)).toBe(true) - - await expect(wait(input)).rejects.toThrow('milliseconds not a number') - }) - - it('waits with a valid number', async () => { - const start = new Date() - await wait(500) - const end = new Date() - - const delta = Math.abs(end.getTime() - start.getTime()) - - expect(delta).toBeGreaterThan(450) - }) -}) diff --git a/dist/index.js b/dist/index.js index ebcabe75b283904d8647aec4da262c0801cb5578..275932f32f848bd7b67c1a79bc0920369d0c051a 100644 GIT binary patch delta 298 zcmYk!%SyvQ7zJRG#;A#HZR-8jzuqRJ(@eBggp#6J30=8#yT%g?m`K6G5Nr%%1fy`^Vhm|yki|H1@Q}v@ zCNYI+%wQICn8yMZv4jE$MJ!_lt60N27<_PSVDm%NLv>gdneROF zJLaCRJL??*=jeMx2K#s9bzgM*m<@8<5_R+x%=wHLMv&3Cbdx8(zdm7;>DHE$A2zv BRMh|g delta 331 zcmX^8?-Jvw|CbmWS{PfHT9{i{T3B1yTG(4SS~y#{TDV(yT6kOdTKHQ8S_E5!T7+9f zT0~pKTEtrZPQnC6?xt=z+vEG&L2fx2GBCIB`wiqOW5)UDI2~bh>;S3)}X` zRys~h)4gqU_@|rO>WEJFx7E?Gw&qfRg3L4p4MmU { const version: string = resolveVersionInput() // Debug logs are only output if the `ACTIONS_STEP_DEBUG` secret is true core.debug(`The input version is: ${version}`) - // 获取输入的architecture - let arch = core.getInput('architecture') - if (!arch) { - arch = os.arch() - } - if (arch === 'x64') { - arch = 'amd64' - } + // // 获取输入的architecture + // let arch = core.getInput('architecture') + // if (!arch) { + // arch = os.arch() + // } // 构建文件名 - const dlgfName = getFileName(version, arch) + const dlgfName = getFileName(version) let installedPath = getRootPath(version) // 尝试从缓存中恢复 const rcr = await ac.restoreCache([installedPath], dlgfName)