diff --git a/.eslintrc.json b/.eslintrc.json index 7ff0c589..ce2dfb06 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,22 +1,11 @@ { - "plugins": [ - "jest", - "@typescript-eslint", - "prettier", - "unicorn" - ], - "extends": [ - "plugin:unicorn/recommended", - "plugin:github/recommended", - "plugin:prettier/recommended" - ], + "plugins": ["jest", "@typescript-eslint", "prettier", "unicorn"], + "extends": ["plugin:unicorn/recommended", "plugin:github/recommended", "plugin:prettier/recommended"], "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": 2020, "sourceType": "module", - "extraFileExtensions": [ - ".mjs" - ], + "extraFileExtensions": [".mjs"], "ecmaFeatures": { "impliedStrict": true }, @@ -33,10 +22,7 @@ // Namespaces or sometimes needed "import/no-namespace": "off", // Properly format comments - "spaced-comment": [ - "error", - "always" - ], + "spaced-comment": ["error", "always"], "lines-around-comment": [ "error", { @@ -71,12 +57,7 @@ // Enforce camelCase "camelcase": "error", // Allow forOfStatements - "no-restricted-syntax": [ - "error", - "ForInStatement", - "LabeledStatement", - "WithStatement" - ], + "no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"], // Continue is viable in forOf loops in generators "no-continue": "off", // From experience, named exports are almost always desired. I got tired of this rule diff --git a/dist/index.js b/dist/index.js index f4883cbc..11c20c3e 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/dist/index.js.map b/dist/index.js.map index 6630b62f..53ba6ed6 100644 Binary files a/dist/index.js.map and b/dist/index.js.map differ diff --git a/src/model/cloud-runner/tests/cloud-runner-github-checks.test.ts b/src/model/cloud-runner/tests/cloud-runner-github-checks.test.ts index 652533f5..19f7c828 100644 --- a/src/model/cloud-runner/tests/cloud-runner-github-checks.test.ts +++ b/src/model/cloud-runner/tests/cloud-runner-github-checks.test.ts @@ -39,11 +39,11 @@ describe('Cloud Runner Github Checks', () => { asyncCloudRunner: `true`, githubChecks: `true`, }); - GitHub.asyncWorkflows = true; + GitHub.forceAsyncTest = true; await CloudRunner.setup(buildParameter); CloudRunner.buildParameters.githubCheckId = await GitHub.createGitHubCheck(`t`); await GitHub.updateGitHubCheck(`t`, `t2`); - GitHub.asyncWorkflows = false; + GitHub.forceAsyncTest = false; }, 1_000_000_000); } }); diff --git a/src/model/github.ts b/src/model/github.ts index 82fdc3ad..0dd18637 100644 --- a/src/model/github.ts +++ b/src/model/github.ts @@ -11,7 +11,7 @@ class GitHub { private static startedDate: string; private static endedDate: string; static result: string = ``; - static asyncWorkflows: boolean; + static forceAsyncTest: boolean; private static get octokitDefaultToken() { return new Octokit({ auth: process.env.GITHUB_TOKEN, @@ -128,7 +128,7 @@ class GitHub { data.conclusion = result; } - await (CloudRunner.isCloudRunnerAsyncEnvironment || GitHub.asyncWorkflows + await (CloudRunner.isCloudRunnerAsyncEnvironment || GitHub.forceAsyncTest ? GitHub.runUpdateAsyncChecksWorkflow(data, `update`) : GitHub.updateGitHubCheckRequest(data)); } diff --git a/test-project/ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json b/test-project/ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json index ad11087f..757e1a0a 100644 --- a/test-project/ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json +++ b/test-project/ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json @@ -1,7 +1,7 @@ { - "m_Name": "Settings", - "m_Path": "ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json", - "m_Dictionary": { - "m_DictionaryValues": [] - } -} \ No newline at end of file + "m_Name": "Settings", + "m_Path": "ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json", + "m_Dictionary": { + "m_DictionaryValues": [] + } +}