mirror of
https://git.studyfor.work/actions/gitea-tool-cache.git
synced 2026-01-12 16:36:02 +08:00
1
This commit is contained in:
parent
3f79b938e5
commit
468338a457
@ -43,31 +43,31 @@ describe('gitea-tool-cache', () => {
|
|||||||
}, 200000);
|
}, 200000);
|
||||||
|
|
||||||
// 测试时需要把别的注释掉
|
// 测试时需要把别的注释掉
|
||||||
it('installs windows', async () => {
|
// it('installs windows', async () => {
|
||||||
rmSync('./cache', { recursive: true, force: true });
|
// rmSync('./cache', { recursive: true, force: true });
|
||||||
os['platform'] = 'win32';
|
// os['platform'] = 'win32';
|
||||||
|
// os['arch'] = 'x64';
|
||||||
|
// // node
|
||||||
|
// inputs['node-version'] = '18';
|
||||||
|
// await nodeInstall();
|
||||||
|
// // // go
|
||||||
|
// // inputs['go-version'] = '1.21.1';
|
||||||
|
// // await goInstall();
|
||||||
|
// // dotnet
|
||||||
|
// // inputs['dotnet-version'] = '6.0.100';
|
||||||
|
// // await dotnetInstall();
|
||||||
|
// });
|
||||||
|
|
||||||
|
it('installs linux', async () => {
|
||||||
|
os['platform'] = 'linux';
|
||||||
os['arch'] = 'x64';
|
os['arch'] = 'x64';
|
||||||
// node
|
|
||||||
inputs['node-version'] = '18 ';
|
inputs['node-version'] = '18 ';
|
||||||
await nodeInstall();
|
await nodeInstall();
|
||||||
// // go
|
|
||||||
// inputs['go-version'] = '1.21.1';
|
|
||||||
// await goInstall();
|
|
||||||
// dotnet
|
|
||||||
// inputs['dotnet-version'] = '6.0.100';
|
|
||||||
// await dotnetInstall();
|
|
||||||
});
|
|
||||||
|
|
||||||
// it('installs linux', async () => {
|
|
||||||
// os['platform'] = 'linux';
|
|
||||||
// os['arch'] = 'x64';
|
|
||||||
// inputs['node-version'] = '18.18.0';
|
|
||||||
// await nodeInstall();
|
|
||||||
// inputs['go-version'] = '1.21.1';
|
// inputs['go-version'] = '1.21.1';
|
||||||
// await goInstall();
|
// await goInstall();
|
||||||
// inputs['dotnet-version'] = '5.0.401';
|
// inputs['dotnet-version'] = '5.0.401';
|
||||||
// await dotnetInstall();
|
// await dotnetInstall();
|
||||||
// });
|
});
|
||||||
|
|
||||||
// it('installs darwin', async () => {
|
// it('installs darwin', async () => {
|
||||||
// os['platform'] = 'darwin';
|
// os['platform'] = 'darwin';
|
||||||
|
|||||||
@ -17,5 +17,5 @@ outputs:
|
|||||||
node-version:
|
node-version:
|
||||||
description: 'The version of node being used'
|
description: 'The version of node being used'
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
using: 'node20'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|||||||
38758
dist/index.js
vendored
38758
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "chcp 65001 && jest --coverage",
|
"test": "chcp 65001 && jest --coverage",
|
||||||
"build": "rimraf ./dist && ncc build -o dist src/index.ts"
|
"build": "rimraf ./dist && ncc build -m -o dist src/index.ts"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tsconfig/node16": "^16.1.1",
|
"@tsconfig/node16": "^16.1.1",
|
||||||
|
|||||||
@ -14,7 +14,6 @@ export async function nodeInstall() {
|
|||||||
console.log('没有node-version,跳过node安装');
|
console.log('没有node-version,跳过node安装');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(nodeVersion);
|
|
||||||
const version = await nodeVersionAlias(nodeVersion, {
|
const version = await nodeVersionAlias(nodeVersion, {
|
||||||
mirror: 'https://npmmirror.com/mirrors/node'
|
mirror: 'https://npmmirror.com/mirrors/node'
|
||||||
}).catch(err => err);
|
}).catch(err => err);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user