Skip to content

Commit 1dab945

Browse files
authored
chore: Remove test dependency on Click and improve CI venv handling (#1443)
Fixes #1441 and hopefully prevents similar issues by doing `pdm sync --clean` intead of `pdm install` in CI Co-authored-by: Dylan Anthony <dbanty@users.noreply.github.com>
1 parent 6df45e9 commit 1dab945

4 files changed

Lines changed: 6 additions & 8 deletions

File tree

.github/workflows/checks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: pip install pdm
3838

3939
- name: Install Dependencies
40-
run: pdm install
40+
run: pdm sync --clean
4141

4242
- name: Check formatting
4343
run: pdm run ruff format . --check
@@ -96,7 +96,7 @@ jobs:
9696
run: pip install pdm
9797

9898
- name: Install minimum dependencies
99-
run: pdm install -L pdm.minimal.lock
99+
run: pdm sync --clean -L pdm.minimal.lock
100100

101101
- name: Run mypy
102102
run: pdm mypy --show-error-codes
@@ -178,7 +178,7 @@ jobs:
178178
run: |
179179
cd integration-tests
180180
pip install pdm
181-
pdm install -L ${{ matrix.lockfile }}
181+
pdm sync --clean -L ${{ matrix.lockfile }}
182182
- name: Run Tests
183183
run: |
184184
cd integration-tests

end_to_end_tests/functional_tests/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Any, Dict
22
import re
33

4-
from click.testing import Result
4+
from typer.testing import Result
55
import pytest
66

77
from end_to_end_tests.generated_client import generate_client_from_inline_spec, GeneratedClientContext

end_to_end_tests/generated_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010
from attrs import define
1111
import pytest
12-
from click.testing import Result
13-
from typer.testing import CliRunner
12+
from typer.testing import CliRunner, Result
1413

1514
from openapi_python_client.cli import app
1615

end_to_end_tests/test_end_to_end.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
from pathlib import Path
66

77
import pytest
8-
from click.testing import Result
9-
from typer.testing import CliRunner
8+
from typer.testing import CliRunner, Result
109

1110
from end_to_end_tests.generated_client import (
1211
_run_command, generate_client, generate_client_from_inline_spec,

0 commit comments

Comments
 (0)