Skip to content

Commit

Permalink
Update test script to use new action setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Pikachu920 committed Aug 16, 2024
1 parent 557af65 commit 3fafa20
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class EnvironmentResource(TypedDict):
skript_repo_ref = os.environ.get("INPUT_SKRIPT_REPO_REF", None)
run_vanilla_tests = os.environ.get("INPUT_RUN_VANILLA_TESTS", None) == "true"
skript_repo_git_url = "https://github.com/SkriptLang/Skript.git"
skript_repo_path = Path("/skript")
skript_repo_path = github_workspace_directory / "skript"
skript_test_directory = skript_repo_path / "src" / "test" / "skript" / "tests"
custom_test_directory = skript_test_directory / "custom"
extra_plugins_directory = None
Expand All @@ -38,10 +38,7 @@ class EnvironmentResource(TypedDict):
print(f" Run vanilla tests: {run_vanilla_tests}")
print(f" Extra plugins directory: {extra_plugins_directory}")

subprocess.run(("git", "clone", "--recurse-submodules", skript_repo_git_url, str(skript_repo_path)))
os.chdir(skript_repo_path)
if skript_repo_ref is not None and not skript_repo_ref.isspace():
subprocess.run(("git", "checkout", "-f", skript_repo_ref))
if not run_vanilla_tests:
print("Deleting vanilla tests")
delete_contents_of_directory(skript_test_directory)
Expand Down

0 comments on commit 3fafa20

Please sign in to comment.