Skip to content

Commit

Permalink
chore: testing ci
Browse files Browse the repository at this point in the history
  • Loading branch information
aorumbayev committed Aug 23, 2024
1 parent faa0892 commit 2bc2f6a
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions tests/portability/test_pyinstaller_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ def command_str_to_list(command: str) -> list[str]:
(command_str_to_list("algokit --help"), [0]),
(command_str_to_list("algokit doctor"), [0]),
(command_str_to_list("algokit task vanity-address PY"), [0]),
(command_str_to_list("algokit init --name playground -t python --no-git --no-ide --defaults"), [0]),
(command_str_to_list("algokit -v project run build"), [0]),
],
)
def test_non_interactive_algokit_commands(
Expand All @@ -46,7 +44,25 @@ def test_non_interactive_algokit_commands(
assert execution_result.returncode in exit_codes, f"Command {command} failed with {execution_result.stderr}"


def test_algokit_init(
def test_algokit_init_and_project_run(tmp_path_factory: pytest.TempPathFactory) -> None:
cwd = tmp_path_factory.mktemp("cwd")

# Run algokit init
init_command = command_str_to_list("algokit init --name playground -t python --no-git --no-ide --defaults")
init_result = subprocess.run(init_command, capture_output=True, text=True, check=False, cwd=cwd)
logger.info(f"Command {init_command} returned {init_result.stdout}")
assert init_result.returncode == 0, f"Init command failed with {init_result.stderr}"

# Run algokit project run build
build_cwd = cwd / "playground"
build_cwd.mkdir(exist_ok=True)
build_command = command_str_to_list("algokit -v project run build")
build_result = subprocess.run(build_command, capture_output=True, text=True, check=False, cwd=build_cwd)
logger.info(f"Command {build_command} returned {build_result.stdout}")
assert build_result.returncode == 0, f"Build command failed with {build_result.stderr}"


def test_algokit_init_with_template_url(
dummy_algokit_template_with_python_task: dict[str, Path],
) -> None:
# TODO: revisit to improve
Expand Down

0 comments on commit 2bc2f6a

Please sign in to comment.