diff --git a/init/dist/main.js b/init/dist/main.js index 0913326..ff28548 100644 --- a/init/dist/main.js +++ b/init/dist/main.js @@ -93174,7 +93174,7 @@ async function getPullRequestNumber() { } // src/main.ts -(async function main() { +async function main() { let cwd = path.join(process.cwd(), ".slo"); let sdk = import_core2.getInput("sdk_name", { required: true }); import_core2.saveState("cwd", cwd); @@ -93221,7 +93221,7 @@ async function getPullRequestNumber() { { import_core2.info("Creating compose config..."); let composePath = path.join(cwd, "compose.yaml"); - let composeContent = generateComposeFile(parseInt(import_core2.getInput("YDB_DATABASE_NODE_COUNT", { required: true }))); + let composeContent = generateComposeFile(parseInt(import_core2.getInput("ydb_database_node_count", { required: true }))); fs.writeFileSync(composePath, composeContent, { encoding: "utf-8" }); import_core2.info(`Created compose.yaml: ${composePath}`); } @@ -93230,4 +93230,5 @@ async function getPullRequestNumber() { let start = new Date; import_core2.info(`YDB started at ${start}`); import_core2.saveState("start", start.toISOString()); -})(); +} +main(); diff --git a/init/dist/post.js b/init/dist/post.js index 6bdf2e6..901f302 100644 --- a/init/dist/post.js +++ b/init/dist/post.js @@ -89361,7 +89361,7 @@ var defaultMetrics = [ ]; // src/post.ts -(async function post() { +async function post() { let cwd = import_core.getState("cwd"); let sdk = import_core.getState("sdk"); let pull = import_core.getState("pull"); @@ -89396,4 +89396,5 @@ var defaultMetrics = [ import_core.info(`YDB SLO Test duration: ${duration}ms.`); import_core.debug("Cleaning up temp directory..."); fs.rmSync(cwd, { recursive: true }); -})(); +} +post(); diff --git a/init/src/main.ts b/init/src/main.ts index 931e123..490a346 100644 --- a/init/src/main.ts +++ b/init/src/main.ts @@ -12,7 +12,8 @@ import prometheusConfig from './cfg/prom/config.yml' with { type: 'text' } import { generateComposeFile } from './configs' import { getPullRequestNumber } from './pulls' import { HOST, PROMETHEUS_PUSHGATEWAY_PORT } from './constants' -;(async function main() { + +async function main() { let cwd = path.join(process.cwd(), '.slo') let sdk = getInput('sdk_name', { required: true }) @@ -74,7 +75,7 @@ import { HOST, PROMETHEUS_PUSHGATEWAY_PORT } from './constants' { info('Creating compose config...') let composePath = path.join(cwd, 'compose.yaml') - let composeContent = generateComposeFile(parseInt(getInput('YDB_DATABASE_NODE_COUNT', { required: true }))) + let composeContent = generateComposeFile(parseInt(getInput('ydb_database_node_count', { required: true }))) fs.writeFileSync(composePath, composeContent, { encoding: 'utf-8' }) info(`Created compose.yaml: ${composePath}`) @@ -86,4 +87,6 @@ import { HOST, PROMETHEUS_PUSHGATEWAY_PORT } from './constants' let start = new Date() info(`YDB started at ${start}`) saveState('start', start.toISOString()) -})() +} + +main() diff --git a/init/src/post.ts b/init/src/post.ts index d847f35..ab844e4 100644 --- a/init/src/post.ts +++ b/init/src/post.ts @@ -7,7 +7,8 @@ import { DefaultArtifactClient } from '@actions/artifact' import { collectPrometheus } from './prometheus' import { defaultMetrics } from './metrics' -;(async function post() { + +async function post() { let cwd = getState('cwd') let sdk = getState('sdk') let pull = getState('pull') @@ -52,4 +53,6 @@ import { defaultMetrics } from './metrics' debug('Cleaning up temp directory...') fs.rmSync(cwd, { recursive: true }) -})() +} + +post()