CI: add Generate.py tests

* allows ModuleUpdate to be run outside of local_dir
* adds windows-latest to the unittest matrix
This commit is contained in:
black-sliver
2022-04-01 01:09:16 +02:00
committed by Fabian Dill
parent dca70a99ad
commit fe4a26d034
5 changed files with 84 additions and 5 deletions

View File

@@ -3,7 +3,8 @@ import sys
import subprocess
import pkg_resources
requirements_files = {'requirements.txt'}
local_dir = os.path.dirname(__file__)
requirements_files = {os.path.join(local_dir, 'requirements.txt')}
if sys.version_info < (3, 8, 6):
raise RuntimeError("Incompatible Python Version. 3.8.7+ is supported.")
@@ -11,7 +12,7 @@ if sys.version_info < (3, 8, 6):
update_ran = getattr(sys, "frozen", False) # don't run update if environment is frozen/compiled
if not update_ran:
for entry in os.scandir("worlds"):
for entry in os.scandir(os.path.join(local_dir, "worlds")):
if entry.is_dir():
req_file = os.path.join(entry.path, "requirements.txt")
if os.path.exists(req_file):