This repository has been archived by the owner on Dec 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* tests * firesale * fix * im going to die * fix * fix * Games * Color * misc change * coco -> cocoa * Rewrite Member Stats * feat(getPlayer): add getplayer never logged in test * Clean tests * Check coverage * fix * better testing * Meow * code * fix formatting * Booster Test * meow * MeowWWW * Test * meow meow meow * Testers * fix * feat(tests): add mock data for firesales * 90% testers * Change Data * Move WatchdogStats * fix idiot * Bazaar * Replace Usernames With UUID * Move coverageCheck.ts * Coverage Check change * i hate my life. Please end it now fucking cunt * update(skills): taming cap * Tests * Testersssszzszszszszsz 95% go brrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr * code i think * Fix Urls --------- Co-authored-by: Zickles <[email protected]>
- Loading branch information
Showing
139 changed files
with
17,543 additions
and
2,455 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { parseString } from 'xml2js'; | ||
import { readFile } from 'fs'; | ||
|
||
function parseXMLFile(): Promise<any> { | ||
return new Promise((resolve, reject) => { | ||
readFile('.github/coverageData.xml', 'utf8', (err, data) => { | ||
if (err) { | ||
reject('File Dose not exist!'); | ||
return; | ||
} | ||
|
||
parseString(data, (err, result) => { | ||
if (err) { | ||
reject('Something Went wrong!'); | ||
return; | ||
} | ||
|
||
resolve(result); | ||
}); | ||
}); | ||
}); | ||
} | ||
|
||
const data = await parseXMLFile(); | ||
const codeStats = data.coverage.project[0].metrics[0].$; | ||
const info = { | ||
statements: Number(codeStats.statements), | ||
coveredstatements: Number(codeStats.coveredstatements), | ||
conditionals: Number(codeStats.conditionals), | ||
coveredconditionals: Number(codeStats.coveredconditionals), | ||
methods: Number(codeStats.methods), | ||
coveredmethods: Number(codeStats.coveredmethods) | ||
}; | ||
|
||
if (95 > (info.coveredstatements / info.statements) * 100) { | ||
throw new Error('Statements is required to be 95% or higher'); | ||
} | ||
|
||
if (95 > (info.coveredconditionals / info.conditionals) * 100) { | ||
throw new Error('Conditionals is required to be 95% or higher'); | ||
} | ||
|
||
if (95 > (info.coveredmethods / info.methods) * 100) { | ||
throw new Error('Methods is required to be 95% or higher'); | ||
} | ||
|
||
if ( | ||
95 > | ||
((info.coveredstatements + info.coveredconditionals + info.coveredmethods) / | ||
(info.statements + info.conditionals + info.methods)) * | ||
100 | ||
) { | ||
throw new Error('Everythng Combinded is required to be 95% or higher'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ oldreborn/ | |
dist/ | ||
.eslintcache | ||
coverage/ | ||
.github/coverageData.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ oldreborn/ | |
.eslintcache | ||
.git | ||
.gitignore | ||
coverage/ | ||
coverage/ | ||
.github/coverageData.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.