Merge pull request #1374 from github/henrymercer/pass-testing-environment

Set testing environment for CodeQL workflow
This commit is contained in:
Henry Mercer 2022-11-16 18:05:00 +00:00 committed by GitHub
commit 0f07790b74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 56 additions and 277 deletions

View file

@ -8,3 +8,6 @@ export const CODEQL_WORKFLOW_STARTED_AT = "CODEQL_WORKFLOW_STARTED_AT";
export const CODEQL_ACTION_TESTING_ENVIRONMENT =
"CODEQL_ACTION_TESTING_ENVIRONMENT";
/** Used to disable uploading SARIF results or status reports to the GitHub API */
export const CODEQL_ACTION_TEST_MODE = "CODEQL_ACTION_TEST_MODE";

View file

@ -20,6 +20,7 @@ import {
import { Feature, FeatureEnablement } from "./feature-flags";
import { Language } from "./languages";
import { Logger } from "./logging";
import { CODEQL_ACTION_TEST_MODE } from "./shared-environment";
/**
* Specifies bundle versions that are known to be broken
@ -664,7 +665,7 @@ export async function checkActionVersion(version: string) {
* In test mode, we don't upload SARIF results or status reports to the GitHub API.
*/
export function isInTestMode(): boolean {
return process.env["TEST_MODE"] === "true";
return process.env[CODEQL_ACTION_TEST_MODE] === "true";
}
/**