add tests

This commit is contained in:
OpportunityLiu
2020-03-20 22:14:58 +08:00
Unverified
parent 7d75884a86
commit be19756845
15 changed files with 3508 additions and 41 deletions
+1 -3
View File
@@ -1,7 +1,5 @@
import * as core from '@actions/core';
import { exec } from '@actions/exec';
import * as _fs from 'fs';
const fs = _fs.promises;
import * as io from '@actions/io';
import * as toolCache from '@actions/tool-cache';
import * as os from 'os';
@@ -21,7 +19,7 @@ async function winInstall(version: string): Promise<void> {
core.info(`downloading from ${url}`);
const file = await toolCache.downloadTool(url);
const exe = path.format({ ...path.parse(file), ext: '.exe', base: undefined });
await fs.rename(file, exe);
await io.mv(file, exe);
core.info(`downloaded to ${exe}`);
return exe;
});