Skip to content

Commit

Permalink
cleanup async parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
frostebite committed Nov 18, 2023
1 parent df4cc41 commit e296ef2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 36 deletions.
29 changes: 5 additions & 24 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -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
},
Expand All @@ -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",
{
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
4 changes: 2 additions & 2 deletions src/model/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"m_Name": "Settings",
"m_Path": "ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json",
"m_Dictionary": {
"m_DictionaryValues": []
}
}
"m_Name": "Settings",
"m_Path": "ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json",
"m_Dictionary": {
"m_DictionaryValues": []
}
}

0 comments on commit e296ef2

Please sign in to comment.