Owr actions update (#19)

* Go for Broke

* Let it fire

* Add PipLine

* Create the dir if it doesn't exist

* Install Setuptools

* Track Test Action's files

* Fix Calling Job

* Track Build Action files

* Install Distutils, rename filenames

* Fix Fail conditions

* Make Build scripts smarter

* Add file

* Concat DLLs lists

* Try to fail if Error DLLs

* Try to make the fail smarter

* Moar verbosity

* Print the stuff first

* Print outputs objects

* See if this skips failure

* Use py instead

* Print error list

* Don't ValueError

* Try checking a different way

* Try something else

* Bleh, spell filename correctly

* Update excluded_dlls.json

* Ugh, gotta compare old to new somehow

* Compare to old list

* Condense build script

* Moar verbosity

* Update the global version

* Update Excluded DLLs list

* Actually use the bad DLLs list

* Make a version number

* Fix version number building

* Fix version number building again

* Fix Diagnostics

* Try REST API stuff

* Try REST API again

* Moar REST

* await

* Get SHA

* Try it all together

* Del test workflow

* Add Perms

* Use a Token

* Try this Token

* Try different Token

* Try different Token

* Create App Version earlier

* See this error again

* Don't fail if App Version not made yet

* Use New Secret

* Print whole response

* Documentation for Tagger

* Update CI Instructions

* Update CI

* List References

* Find latest tag

Fix App Version getter

* Fix commas

* Check returned data

* Update Build Script

* Fix substring

* Fix Git tag

* Fix tag again

* Visual indicators

* Use encoding

* Remove an indicator

* Update CI

* Update Project Name

* PyInstaller Spec Template file

* Update Build Script

* Fix Tagger

* Update CI

* Download AppVersion during build

* Test job can fail

* Upload Logs instead of printing them

* Change from Reusable Workflow to Action

* Change ref to token

* Compare to string

* Use PAT

* Use String literal

* Remove Reusable Workflow

* Update CI Scripts

* Go for Broke

* Let it fire

* Add PipLine

* Create the dir if it doesn't exist

* Install Setuptools

* Track Test Action's files

* Fix Calling Job

* Track Build Action files

* Install Distutils, rename filenames

* Fix Fail conditions

* Make Build scripts smarter

* Add file

* Concat DLLs lists

* Try to fail if Error DLLs

* Try to make the fail smarter

* Moar verbosity

* Print the stuff first

* Print outputs objects

* See if this skips failure

* Use py instead

* Print error list

* Don't ValueError

* Try checking a different way

* Try something else

* Bleh, spell filename correctly

* Update excluded_dlls.json

* Ugh, gotta compare old to new somehow

* Compare to old list

* Condense build script

* Moar verbosity

* Update the global version

* Update Excluded DLLs list

* Actually use the bad DLLs list

* Make a version number

* Fix version number building

* Fix version number building again

* Fix Diagnostics

* Try REST API stuff

* Try REST API again

* Moar REST

* await

* Get SHA

* Try it all together

* Del test workflow

* Add Perms

* Use a Token

* Try this Token

* Try different Token

* Try different Token

* Create App Version earlier

* See this error again

* Don't fail if App Version not made yet

* Use New Secret

* Print whole response

* Documentation for Tagger

* Update CI Instructions

* Update CI

* List References

* Find latest tag

Fix App Version getter

* Fix commas

* Check returned data

* Update Build Script

* Fix substring

* Fix Git tag

* Fix tag again

* Visual indicators

* Use encoding

* Remove an indicator

* Update CI

* Update Project Name

* PyInstaller Spec Template file

* Update Build Script

* Fix Tagger

* Update CI

* Download AppVersion during build

* Test job can fail

* Upload Logs instead of printing them

* Change from Reusable Workflow to Action

* Change ref to token

* Compare to string

* Use PAT

* Use String literal

* Remove Reusable Workflow

* Update CI Scripts

---------

Co-authored-by: Minnie A. Trethewey (Mike) <minnietrethewey@gmail.com>
This commit is contained in:
codemann8
2024-05-23 19:29:39 -05:00
committed by GitHub
parent 9eb5293a3c
commit b55c3700c0
39 changed files with 2076 additions and 588 deletions

View File

@@ -10,6 +10,16 @@ from collections import OrderedDict
cpu_threads = multiprocessing.cpu_count()
py_version = f"{sys.version_info.major}.{sys.version_info.minor}"
PYLINE = "python"
PIPLINE_PATH = os.path.join(".","resources","user","meta","manifests","pipline.txt")
if os.path.isfile(PIPLINE_PATH):
with open(PIPLINE_PATH) as pipline_file:
PYLINE = pipline_file.read().replace("-m pip","").strip()
results = {
"errors": [],
"success": []
}
def main(args=None):
successes = []
@@ -28,7 +38,7 @@ def main(args=None):
def test(test_name: str, command: str, test_file: str):
tests[test_name] = [command]
base_command = f"python3 DungeonRandomizer.py --suppress_rom --suppress_spoiler"
base_command = f"{PYLINE} DungeonRandomizer.py --suppress_rom --jsonout --spoiler none"
def gen_seed():
task_command = base_command + " " + command
@@ -102,7 +112,7 @@ if __name__ == "__main__":
test_suites = {}
# not sure if it supports subdirectories properly yet
for root, dirnames, filenames in os.walk('test/suite'):
for root, dirnames, filenames in os.walk(os.path.join("test","suite")):
test_suites[root] = fnmatch.filter(filenames, '*.yaml')
args = argparse.Namespace()
@@ -113,14 +123,30 @@ if __name__ == "__main__":
successes += s
print()
LOGPATH = os.path.join(".","logs")
if not os.path.isdir(LOGPATH):
os.makedirs(LOGPATH)
if errors:
with open(f"new-test-suite-errors.txt", 'w') as stream:
with open(os.path.join(LOGPATH, "new-test-suite-errors.txt"), 'w') as stream:
for error in errors:
stream.write(error[0] + "\n")
stream.write(error[1] + "\n")
stream.write(error[2] + "\n\n")
error[2] = error[2].split("\n")
results["errors"].append(error)
with open("new-test-suite-success.txt", "w") as stream:
stream.write(str.join("\n", successes))
results["success"] = successes
input("Press enter to continue")
num_errors = len(results["errors"])
num_success = len(results["success"])
num_total = num_errors + num_success
print(f"Errors: {num_errors}/{num_total}")
print(f"Success: {num_success}/{num_total}")
# print(results)
if (num_errors/num_total) > (num_success/num_total):
exit(1)