From d4cf8b53517f199de4580d81454e9b7f313d275d Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Thu, 22 Jan 2026 20:06:54 +0100 Subject: [PATCH 1/3] 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 --- .github/workflows/_check_code.yaml | 8 ++++---- .github/workflows/_tests.yaml | 22 ++++++++++++---------- pyproject.toml | 16 ++++++++-------- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/.github/workflows/_check_code.yaml b/.github/workflows/_check_code.yaml index bb6b24e5..68914d48 100644 --- a/.github/workflows/_check_code.yaml +++ b/.github/workflows/_check_code.yaml @@ -28,12 +28,12 @@ jobs: lint_check: name: Lint check - uses: apify/workflows/.github/workflows/python_lint_check.yaml@main + uses: apify/workflows/.github/workflows/python_lint_check.yaml@improve-shared-python-workflows with: - python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' + python_versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' type_check: name: Type check - uses: apify/workflows/.github/workflows/python_type_check.yaml@main + uses: apify/workflows/.github/workflows/python_type_check.yaml@improve-shared-python-workflows with: - python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' + python_versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' diff --git a/.github/workflows/_tests.yaml b/.github/workflows/_tests.yaml index 4c609824..48890176 100644 --- a/.github/workflows/_tests.yaml +++ b/.github/workflows/_tests.yaml @@ -10,20 +10,22 @@ on: jobs: unit_tests: name: Unit tests - uses: apify/workflows/.github/workflows/python_unit_tests.yaml@main + uses: apify/workflows/.github/workflows/python_unit_tests.yaml@improve-shared-python-workflows secrets: inherit with: - python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' - operating-systems: '["ubuntu-latest", "windows-latest"]' - python-version-for-codecov: "3.14" - operating-system-for-codecov: ubuntu-latest + python_versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' + operating_systems: '["ubuntu-latest", "windows-latest"]' + python_version_for_codecov: "3.14" + operating_system_for_codecov: ubuntu-latest + tests_concurrency: "auto" integration_tests: name: Integration tests - uses: apify/workflows/.github/workflows/python_integration_tests.yaml@main + uses: apify/workflows/.github/workflows/python_integration_tests.yaml@improve-shared-python-workflows secrets: inherit with: - python-versions: '["3.10", "3.14"]' - operating-systems: '["ubuntu-latest"]' - python-version-for-codecov: "3.14" - operating-system-for-codecov: ubuntu-latest + python_versions: '["3.10", "3.14"]' + operating_systems: '["ubuntu-latest"]' + python_version_for_codecov: "3.14" + operating_system_for_codecov: ubuntu-latest + tests_concurrency: "16" diff --git a/pyproject.toml b/pyproject.toml index b524d7c9..ccd839d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -192,10 +192,10 @@ known-first-party = ["apify_client", "apify_shared", "crawlee"] max-branches = 18 [tool.pytest.ini_options] -addopts = "-ra" +addopts = "-r a --verbose" asyncio_default_fixture_loop_scope = "function" asyncio_mode = "auto" -timeout = 1200 +timeout = 1800 [tool.ty.environment] python-version = "3.10" @@ -222,13 +222,13 @@ context = 7 [tool.poe.tasks] clean = "rm -rf .coverage .pytest_cache .ruff_cache .ty_cache build dist htmlcov" install-sync = "uv sync --all-extras" -build = "uv build --verbose" -publish-to-pypi = "uv publish --verbose --token ${APIFY_PYPI_TOKEN_CRAWLEE}" +build = "uv build" +publish-to-pypi = "uv publish --token ${APIFY_PYPI_TOKEN_CRAWLEE}" type-check = "uv run ty check" -unit-tests = "uv run pytest --numprocesses=auto --verbose tests/unit" -unit-tests-cov = "uv run pytest --numprocesses=auto --verbose --cov=src/apify --cov-report=xml:coverage-unit.xml tests/unit" -integration-tests = "uv run pytest --numprocesses=${INTEGRATION_TESTS_CONCURRENCY:-1} --verbose tests/integration" -integration-tests-cov = "uv run pytest --numprocesses=${INTEGRATION_TESTS_CONCURRENCY:-1} --verbose --cov=src/apify --cov-report=xml:coverage-integration.xml tests/integration" +unit-tests = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} tests/unit" +unit-tests-cov = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} --cov=src/apify --cov-report=xml:coverage-unit.xml tests/unit" +integration-tests = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} tests/integration" +integration-tests-cov = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} --cov=src/apify --cov-report=xml:coverage-integration.xml tests/integration" check-code = ["lint", "type-check", "unit-tests"] [tool.poe.tasks.install-dev] From 14fc3ac8d957a1e9b88843ee3973af3065b353a1 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Thu, 22 Jan 2026 20:19:55 +0100 Subject: [PATCH 2/3] concurrency --- .github/workflows/_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/_tests.yaml b/.github/workflows/_tests.yaml index 48890176..9f115863 100644 --- a/.github/workflows/_tests.yaml +++ b/.github/workflows/_tests.yaml @@ -17,7 +17,7 @@ jobs: operating_systems: '["ubuntu-latest", "windows-latest"]' python_version_for_codecov: "3.14" operating_system_for_codecov: ubuntu-latest - tests_concurrency: "auto" + tests_concurrency: "1" integration_tests: name: Integration tests From 9a15762923a38bcdecd60e42303978c5eb2f0ff0 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Fri, 23 Jan 2026 09:51:25 +0100 Subject: [PATCH 3/3] branch name --- .github/workflows/_check_code.yaml | 4 ++-- .github/workflows/_tests.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/_check_code.yaml b/.github/workflows/_check_code.yaml index 68914d48..be9db967 100644 --- a/.github/workflows/_check_code.yaml +++ b/.github/workflows/_check_code.yaml @@ -28,12 +28,12 @@ jobs: lint_check: name: Lint check - uses: apify/workflows/.github/workflows/python_lint_check.yaml@improve-shared-python-workflows + uses: apify/workflows/.github/workflows/python_lint_check.yaml@main with: python_versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' type_check: name: Type check - uses: apify/workflows/.github/workflows/python_type_check.yaml@improve-shared-python-workflows + uses: apify/workflows/.github/workflows/python_type_check.yaml@main with: python_versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' diff --git a/.github/workflows/_tests.yaml b/.github/workflows/_tests.yaml index 9f115863..1bf30fc9 100644 --- a/.github/workflows/_tests.yaml +++ b/.github/workflows/_tests.yaml @@ -10,7 +10,7 @@ on: jobs: unit_tests: name: Unit tests - uses: apify/workflows/.github/workflows/python_unit_tests.yaml@improve-shared-python-workflows + uses: apify/workflows/.github/workflows/python_unit_tests.yaml@main secrets: inherit with: python_versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' @@ -21,7 +21,7 @@ jobs: integration_tests: name: Integration tests - uses: apify/workflows/.github/workflows/python_integration_tests.yaml@improve-shared-python-workflows + uses: apify/workflows/.github/workflows/python_integration_tests.yaml@main secrets: inherit with: python_versions: '["3.10", "3.14"]'