Skip to content

Commit 410f008

Browse files
vdusekclaude
andcommitted
chore: Update to improved shared Python workflows
Workflow improvements: - Update shared workflow input names to snake_case - Add tests_concurrency input for controlling parallel test execution - Use @improve-shared-python-workflows branch for testing Pytest configuration: - Standardize addopts to "-r a --verbose" - Set timeout to 1800 seconds - Use TESTS_CONCURRENCY env var in poe tasks (default: auto) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 831f91a commit 410f008

File tree

3 files changed

+24
-22
lines changed

3 files changed

+24
-22
lines changed

.github/workflows/_check_code.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ jobs:
2828

2929
lint_check:
3030
name: Lint check
31-
uses: apify/workflows/.github/workflows/python_lint_check.yaml@main
31+
uses: apify/workflows/.github/workflows/python_lint_check.yaml@improve-shared-python-workflows
3232
with:
33-
python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
33+
python_versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
3434

3535
type_check:
3636
name: Type check
37-
uses: apify/workflows/.github/workflows/python_type_check.yaml@main
37+
uses: apify/workflows/.github/workflows/python_type_check.yaml@improve-shared-python-workflows
3838
with:
39-
python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
39+
python_versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'

.github/workflows/_tests.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,22 @@ on:
1010
jobs:
1111
unit_tests:
1212
name: Unit tests
13-
uses: apify/workflows/.github/workflows/python_unit_tests.yaml@main
13+
uses: apify/workflows/.github/workflows/python_unit_tests.yaml@improve-shared-python-workflows
1414
secrets: inherit
1515
with:
16-
python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
17-
operating-systems: '["ubuntu-latest", "windows-latest"]'
18-
python-version-for-codecov: "3.14"
19-
operating-system-for-codecov: ubuntu-latest
16+
python_versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
17+
operating_systems: '["ubuntu-latest", "windows-latest"]'
18+
python_version_for_codecov: "3.14"
19+
operating_system_for_codecov: ubuntu-latest
20+
tests_concurrency: "auto"
2021

2122
integration_tests:
2223
name: Integration tests
23-
uses: apify/workflows/.github/workflows/python_integration_tests.yaml@main
24+
uses: apify/workflows/.github/workflows/python_integration_tests.yaml@improve-shared-python-workflows
2425
secrets: inherit
2526
with:
26-
python-versions: '["3.10", "3.14"]'
27-
operating-systems: '["ubuntu-latest"]'
28-
python-version-for-codecov: "3.14"
29-
operating-system-for-codecov: ubuntu-latest
27+
python_versions: '["3.10", "3.14"]'
28+
operating_systems: '["ubuntu-latest"]'
29+
python_version_for_codecov: "3.14"
30+
operating_system_for_codecov: ubuntu-latest
31+
tests_concurrency: "auto"

pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ known-local-folder = ["apify_client"]
154154
max-branches = 18
155155

156156
[tool.pytest.ini_options]
157-
addopts = "-ra"
157+
addopts = "-r a --verbose"
158158
asyncio_default_fixture_loop_scope = "function"
159159
asyncio_mode = "auto"
160-
timeout = 1200
160+
timeout = 1800
161161

162162
[tool.ty.environment]
163163
python-version = "3.10"
@@ -184,13 +184,13 @@ context = 7
184184
[tool.poe.tasks]
185185
clean = "rm -rf .coverage .pytest_cache .ruff_cache .ty_cache build dist htmlcov"
186186
install-sync = "uv sync --all-extras"
187-
build = "uv build --verbose"
188-
publish-to-pypi = "uv publish --verbose --token ${APIFY_PYPI_TOKEN_CRAWLEE}"
187+
build = "uv build"
188+
publish-to-pypi = "uv publish --token ${APIFY_PYPI_TOKEN_CRAWLEE}"
189189
type-check = "uv run ty check"
190-
unit-tests = "uv run pytest --numprocesses=auto --verbose tests/unit"
191-
unit-tests-cov = "uv run pytest --numprocesses=auto --verbose --cov=src/apify_client --cov-report=xml:coverage-unit.xml tests/unit"
192-
integration-tests = "uv run pytest --numprocesses=${INTEGRATION_TESTS_CONCURRENCY:-1} --verbose tests/integration"
193-
integration-tests-cov = "uv run pytest --numprocesses=${INTEGRATION_TESTS_CONCURRENCY:-1} --verbose --cov=src/apify_client --cov-report=xml:coverage-integration.xml tests/integration"
190+
unit-tests = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} tests/unit"
191+
unit-tests-cov = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} --cov=src/apify_client --cov-report=xml:coverage-unit.xml tests/unit"
192+
integration-tests = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} tests/integration"
193+
integration-tests-cov = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} --cov=src/apify_client --cov-report=xml:coverage-integration.xml tests/integration"
194194
check-async-docstrings = "uv run python scripts/check_async_docstrings.py"
195195
fix-async-docstrings = "uv run python scripts/fix_async_docstrings.py"
196196
check-code = ["lint", "type-check", "unit-tests", "check-async-docstrings"]

0 commit comments

Comments
 (0)