From 478a21dc01d00357c7c78e6af142d3e2d578d1e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sun, 8 Nov 2026 12:19:25 +0100 Subject: [PATCH 1/3] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Use=20latest-known=20u?= =?UTF-8?q?v=20in=20GitHub=20Actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fastapi_cloud_cli/commands/ci/print_workflow.py | 2 +- src/fastapi_cloud_cli/commands/setup_ci.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fastapi_cloud_cli/commands/ci/print_workflow.py b/src/fastapi_cloud_cli/commands/ci/print_workflow.py index 89d212c2..8e593cb7 100644 --- a/src/fastapi_cloud_cli/commands/ci/print_workflow.py +++ b/src/fastapi_cloud_cli/commands/ci/print_workflow.py @@ -20,7 +20,7 @@ class CIWorkflowOutput(BaseModel): def _render_workflow_output(data: CIWorkflowOutput, toolkit: RichToolkit) -> None: - toolkit.console.print(data.content, markup=False, end="") + toolkit.console.print(data.content, markup=False, end="", soft_wrap=True) @ci_app.command("print-workflow") diff --git a/src/fastapi_cloud_cli/commands/setup_ci.py b/src/fastapi_cloud_cli/commands/setup_ci.py index caf9eac0..5f3767d5 100644 --- a/src/fastapi_cloud_cli/commands/setup_ci.py +++ b/src/fastapi_cloud_cli/commands/setup_ci.py @@ -171,7 +171,9 @@ def _get_workflow_content(branch: str) -> str: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - uses: astral-sh/setup-uv@v7 + - uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2 + with: + version: "latest-known" - run: uv run fastapi deploy env: FASTAPI_CLOUD_TOKEN: ${{{{ secrets.FASTAPI_CLOUD_TOKEN }}}} From d2cdb0e96d61e4105ba71b5b59a4ff3601f2f49a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sun, 8 Nov 2026 12:40:14 +0100 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=90=9B=20Preserve=20long=20lines=20in?= =?UTF-8?q?=20printed=20CI=20workflows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fastapi_cloud_cli/commands/ci/print_workflow.py | 2 +- tests/test_cli_ci.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/fastapi_cloud_cli/commands/ci/print_workflow.py b/src/fastapi_cloud_cli/commands/ci/print_workflow.py index 89d212c2..8e593cb7 100644 --- a/src/fastapi_cloud_cli/commands/ci/print_workflow.py +++ b/src/fastapi_cloud_cli/commands/ci/print_workflow.py @@ -20,7 +20,7 @@ class CIWorkflowOutput(BaseModel): def _render_workflow_output(data: CIWorkflowOutput, toolkit: RichToolkit) -> None: - toolkit.console.print(data.content, markup=False, end="") + toolkit.console.print(data.content, markup=False, end="", soft_wrap=True) @ci_app.command("print-workflow") diff --git a/tests/test_cli_ci.py b/tests/test_cli_ci.py index 10cff5a4..fa44453f 100644 --- a/tests/test_cli_ci.py +++ b/tests/test_cli_ci.py @@ -42,11 +42,14 @@ def test_print_workflow_uses_default_branch() -> None: assert result.stderr == "" -def test_print_workflow_uses_branch_option() -> None: - result = runner.invoke(app, ["ci", "print-workflow", "--branch", "main"]) +@pytest.mark.parametrize("branch", ["main", "feature/" + "long-branch-name-" * 8]) +def test_print_workflow_uses_branch_option(branch: str) -> None: + result = runner.invoke( + app, ["ci", "print-workflow", "--branch", branch], env={"COLUMNS": "80"} + ) assert result.exit_code == 0 - assert result.stdout == _get_workflow_content("main") + assert result.stdout == _get_workflow_content(branch) assert result.stderr == "" From d32827043ddc1c4f5ea6373481ceac54047c0402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sun, 8 Nov 2026 12:44:50 +0100 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=94=A7=20Separate=20uv=20configuratio?= =?UTF-8?q?n=20from=20workflow=20printing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fastapi_cloud_cli/commands/ci/print_workflow.py | 2 +- src/fastapi_cloud_cli/commands/setup_ci.py | 3 ++- tests/test_cli_ci.py | 9 +++------ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/fastapi_cloud_cli/commands/ci/print_workflow.py b/src/fastapi_cloud_cli/commands/ci/print_workflow.py index 8e593cb7..89d212c2 100644 --- a/src/fastapi_cloud_cli/commands/ci/print_workflow.py +++ b/src/fastapi_cloud_cli/commands/ci/print_workflow.py @@ -20,7 +20,7 @@ class CIWorkflowOutput(BaseModel): def _render_workflow_output(data: CIWorkflowOutput, toolkit: RichToolkit) -> None: - toolkit.console.print(data.content, markup=False, end="", soft_wrap=True) + toolkit.console.print(data.content, markup=False, end="") @ci_app.command("print-workflow") diff --git a/src/fastapi_cloud_cli/commands/setup_ci.py b/src/fastapi_cloud_cli/commands/setup_ci.py index 5f3767d5..e0239837 100644 --- a/src/fastapi_cloud_cli/commands/setup_ci.py +++ b/src/fastapi_cloud_cli/commands/setup_ci.py @@ -171,7 +171,8 @@ def _get_workflow_content(branch: str) -> str: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2 + # setup-uv v10.3.2 + - uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e with: version: "latest-known" - run: uv run fastapi deploy diff --git a/tests/test_cli_ci.py b/tests/test_cli_ci.py index fa44453f..10cff5a4 100644 --- a/tests/test_cli_ci.py +++ b/tests/test_cli_ci.py @@ -42,14 +42,11 @@ def test_print_workflow_uses_default_branch() -> None: assert result.stderr == "" -@pytest.mark.parametrize("branch", ["main", "feature/" + "long-branch-name-" * 8]) -def test_print_workflow_uses_branch_option(branch: str) -> None: - result = runner.invoke( - app, ["ci", "print-workflow", "--branch", branch], env={"COLUMNS": "80"} - ) +def test_print_workflow_uses_branch_option() -> None: + result = runner.invoke(app, ["ci", "print-workflow", "--branch", "main"]) assert result.exit_code == 0 - assert result.stdout == _get_workflow_content(branch) + assert result.stdout == _get_workflow_content("main") assert result.stderr == ""