Skip to content

Commit 745f92d

Browse files
✅ Fix test coverage (#130)
* ✅ Fix test coverage * Update .github/workflows/test.yml Co-authored-by: Jonathan Ehwald <[email protected]> --------- Co-authored-by: Jonathan Ehwald <[email protected]>
1 parent e602669 commit 745f92d

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,19 @@ jobs:
9696
# Issue ref: https://github.com/actions/setup-python/issues/436
9797
# cache: "pip"
9898
# cache-dependency-path: pyproject.toml
99+
- name: Install uv
100+
uses: astral-sh/setup-uv@v7
99101
- name: Get coverage files
100102
uses: actions/download-artifact@v5
101103
with:
102104
pattern: coverage-*
103105
path: coverage
104106
merge-multiple: true
105-
- run: pip install coverage[toml]
107+
- run: uv sync --locked --all-extras --dev
106108
- run: ls -la coverage
107-
- run: coverage combine coverage
108-
- run: coverage report
109-
- run: coverage html --title "Coverage for ${{ github.sha }}"
109+
- run: uv run coverage combine coverage
110+
- run: uv run coverage report
111+
- run: uv run coverage html --title "Coverage for ${{ github.sha }}"
110112
- name: Store coverage HTML
111113
uses: actions/upload-artifact@v4
112114
with:

tests/test_cli_login.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919

2020

2121
@pytest.mark.respx(base_url=settings.base_api_url)
22-
def test_shows_a_message_if_something_is_wrong(respx_mock: respx.MockRouter) -> None:
22+
def test_shows_a_message_if_something_is_wrong(
23+
logged_out_cli: None, respx_mock: respx.MockRouter
24+
) -> None:
2325
with patch("fastapi_cloud_cli.commands.login.typer.launch") as mock_open:
2426
respx_mock.post(
2527
"/login/device/authorization", data={"client_id": settings.client_id}

0 commit comments

Comments
 (0)