Skip to content

Commit db076de

Browse files
committed
test: Refactor integration tests to simplify paths
1 parent 62e23bc commit db076de

20 files changed

+6
-10
lines changed

.github/workflows/checks.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -113,24 +113,23 @@ jobs:
113113
poetry install
114114
- name: Regenerate Integration Client
115115
run: |
116-
cd integration_tests
117-
poetry run openapi-python-client update --url http://localhost:3000/openapi.json
116+
poetry run openapi-python-client update --url http://localhost:3000/openapi.json --config integration-tests-config.yaml
118117
- name: Cache Generated Client Dependencies
119118
uses: actions/cache@v2
120119
with:
121-
path: integration_tests/openapi-test-server-client/.venv
120+
path: integration-tests/.venv
122121
key: ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-integration-dependencies-${{ hashFiles('**/poetry.lock') }}
123122
restore-keys: |
124123
${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-integration-dependencies
125124
- name: Install Integration Dependencies
126125
run: |
127-
cd integration_tests/openapi-test-server-client
126+
cd integration-tests
128127
python -m venv .venv
129128
poetry run python -m pip install --upgrade pip
130129
poetry install
131130
- name: Run Tests
132131
run: |
133-
cd integration_tests/openapi-test-server-client
132+
cd integration-tests
134133
poetry run pytest
135134
- uses: stefanzweifel/git-auto-commit-action@v4
136135
with:

integration-tests-config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
project_name_override: integration-tests

pyproject.toml

+1-5
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ task regen\
7575
&& task e2e\
7676
"""
7777
regen_e2e = "python -m end_to_end_tests.regen_golden_record"
78-
regen_integration = """
79-
pushd integration_tests\
80-
&& openapi-python-client update --url https://raw.githubusercontent.com/openapi-generators/openapi-test-server/main/openapi.json\
81-
&& popd
82-
"""
78+
regen_integration = "openapi-python-client update --url https://raw.githubusercontent.com/openapi-generators/openapi-test-server/main/openapi.json --config integration-tests-config.yaml"
8379
docs = "typer openapi_python_client/cli.py utils docs > usage.md"
8480

8581
[tool.black]

0 commit comments

Comments
 (0)