Skip to content

Commit d4cf8b5

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 671e323 commit d4cf8b5

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: "16"

pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ known-first-party = ["apify_client", "apify_shared", "crawlee"]
192192
max-branches = 18
193193

194194
[tool.pytest.ini_options]
195-
addopts = "-ra"
195+
addopts = "-r a --verbose"
196196
asyncio_default_fixture_loop_scope = "function"
197197
asyncio_mode = "auto"
198-
timeout = 1200
198+
timeout = 1800
199199

200200
[tool.ty.environment]
201201
python-version = "3.10"
@@ -222,13 +222,13 @@ context = 7
222222
[tool.poe.tasks]
223223
clean = "rm -rf .coverage .pytest_cache .ruff_cache .ty_cache build dist htmlcov"
224224
install-sync = "uv sync --all-extras"
225-
build = "uv build --verbose"
226-
publish-to-pypi = "uv publish --verbose --token ${APIFY_PYPI_TOKEN_CRAWLEE}"
225+
build = "uv build"
226+
publish-to-pypi = "uv publish --token ${APIFY_PYPI_TOKEN_CRAWLEE}"
227227
type-check = "uv run ty check"
228-
unit-tests = "uv run pytest --numprocesses=auto --verbose tests/unit"
229-
unit-tests-cov = "uv run pytest --numprocesses=auto --verbose --cov=src/apify --cov-report=xml:coverage-unit.xml tests/unit"
230-
integration-tests = "uv run pytest --numprocesses=${INTEGRATION_TESTS_CONCURRENCY:-1} --verbose tests/integration"
231-
integration-tests-cov = "uv run pytest --numprocesses=${INTEGRATION_TESTS_CONCURRENCY:-1} --verbose --cov=src/apify --cov-report=xml:coverage-integration.xml tests/integration"
228+
unit-tests = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} tests/unit"
229+
unit-tests-cov = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} --cov=src/apify --cov-report=xml:coverage-unit.xml tests/unit"
230+
integration-tests = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} tests/integration"
231+
integration-tests-cov = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} --cov=src/apify --cov-report=xml:coverage-integration.xml tests/integration"
232232
check-code = ["lint", "type-check", "unit-tests"]
233233

234234
[tool.poe.tasks.install-dev]

0 commit comments

Comments
 (0)