Remove local environment running
This is a functionality that never worked perfectly and hasn't been used for a while. This allows developers to run the action on their local machine, but the run was always flaky and never 100% mirrored what was happening on the actions runner.
This commit is contained in:
parent
3708898bf2
commit
2c2ebdc5c5
19 changed files with 21 additions and 262 deletions
16
lib/util.test.js
generated
16
lib/util.test.js
generated
|
|
@ -19,7 +19,6 @@ const sinon_1 = __importDefault(require("sinon"));
|
|||
const api = __importStar(require("./api-client"));
|
||||
const logging_1 = require("./logging");
|
||||
const testing_utils_1 = require("./testing-utils");
|
||||
const util_1 = require("./util");
|
||||
const util = __importStar(require("./util"));
|
||||
testing_utils_1.setupTests(ava_1.default);
|
||||
ava_1.default("getToolNames", (t) => {
|
||||
|
|
@ -71,21 +70,6 @@ ava_1.default("getThreadsFlag() should return the correct --threads flag", (t) =
|
|||
ava_1.default("getThreadsFlag() throws if the threads input is not an integer", (t) => {
|
||||
t.throws(() => util.getThreadsFlag("hello!", logging_1.getRunnerLogger(true)));
|
||||
});
|
||||
ava_1.default("isLocalRun() runs correctly", (t) => {
|
||||
util_1.initializeEnvironment(util_1.Mode.actions, "1.2.3");
|
||||
process.env.CODEQL_LOCAL_RUN = "";
|
||||
t.assert(!util.isLocalRun());
|
||||
process.env.CODEQL_LOCAL_RUN = "false";
|
||||
t.assert(!util.isLocalRun());
|
||||
process.env.CODEQL_LOCAL_RUN = "0";
|
||||
t.assert(!util.isLocalRun());
|
||||
process.env.CODEQL_LOCAL_RUN = "true";
|
||||
t.assert(util.isLocalRun());
|
||||
process.env.CODEQL_LOCAL_RUN = "hucairz";
|
||||
t.assert(util.isLocalRun());
|
||||
util_1.initializeEnvironment(util_1.Mode.runner, "1.2.3");
|
||||
t.assert(!util.isLocalRun());
|
||||
});
|
||||
ava_1.default("getExtraOptionsEnvParam() succeeds on valid JSON with invalid options (for now)", (t) => {
|
||||
const origExtraOptions = process.env.CODEQL_ACTION_EXTRA_OPTIONS;
|
||||
const options = { foo: 42 };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue