From 37808433ab7f9dd84820e5ac40bd2f07cd841d14 Mon Sep 17 00:00:00 2001 From: Patrick Arminio Date: Fri, 5 Dec 2025 16:54:12 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=85=20Fix=20test=20coverage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 10 ++++++---- tests/test_cli_login.py | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f7334ab..13f6f7a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -96,17 +96,19 @@ jobs: # Issue ref: https://github.com/actions/setup-python/issues/436 # cache: "pip" # cache-dependency-path: pyproject.toml + - name: Install uv + uses: astral-sh/setup-uv@v7 - name: Get coverage files uses: actions/download-artifact@v5 with: pattern: coverage-* path: coverage merge-multiple: true - - run: pip install coverage[toml] + - run: uv sync - run: ls -la coverage - - run: coverage combine coverage - - run: coverage report - - run: coverage html --title "Coverage for ${{ github.sha }}" + - run: uv run coverage combine coverage + - run: uv run coverage report + - run: uv run coverage html --title "Coverage for ${{ github.sha }}" - name: Store coverage HTML uses: actions/upload-artifact@v4 with: diff --git a/tests/test_cli_login.py b/tests/test_cli_login.py index 6d1f7ee..f84501a 100644 --- a/tests/test_cli_login.py +++ b/tests/test_cli_login.py @@ -19,7 +19,9 @@ @pytest.mark.respx(base_url=settings.base_api_url) -def test_shows_a_message_if_something_is_wrong(respx_mock: respx.MockRouter) -> None: +def test_shows_a_message_if_something_is_wrong( + logged_out_cli: None, respx_mock: respx.MockRouter +) -> None: with patch("fastapi_cloud_cli.commands.login.typer.launch") as mock_open: respx_mock.post( "/login/device/authorization", data={"client_id": settings.client_id} From b985596cd6317ee1233ffbae6f6b323c077ecc4d Mon Sep 17 00:00:00 2001 From: Patrick Arminio Date: Sat, 6 Dec 2025 11:53:16 +0000 Subject: [PATCH 2/2] Update .github/workflows/test.yml Co-authored-by: Jonathan Ehwald --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 13f6f7a..f72fb9b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -104,7 +104,7 @@ jobs: pattern: coverage-* path: coverage merge-multiple: true - - run: uv sync + - run: uv sync --locked --all-extras --dev - run: ls -la coverage - run: uv run coverage combine coverage - run: uv run coverage report