Skip to content

Commit f0ec030

Browse files
vdusekclaude
andauthored
ci: Improve shared python workflows (#58)
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 - Remove unnecessary codecov inputs (now optional in shared workflow) 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 ec7bd63 commit f0ec030

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

.github/workflows/_check_code.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ jobs:
3030
name: Lint check
3131
uses: apify/workflows/.github/workflows/python_lint_check.yaml@main
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
3737
uses: apify/workflows/.github/workflows/python_type_check.yaml@main
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: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ jobs:
1212
name: Unit tests
1313
uses: apify/workflows/.github/workflows/python_unit_tests.yaml@main
1414
with:
15-
python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
16-
operating-systems: '["ubuntu-latest", "windows-latest"]'
17-
# Apify shared don't use codecov, but we have to provide these inputs.
18-
python-version-for-codecov: "3.14"
19-
operating-system-for-codecov: ubuntu-latest
15+
python_versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
16+
operating_systems: '["ubuntu-latest", "windows-latest"]'
17+
tests_concurrency: "1"
18+
# Codecov inputs omitted - apify-shared-python doesn't use codecov.

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ docstring-quotes = "double"
9595
inline-quotes = "single"
9696

9797
[tool.pytest.ini_options]
98-
addopts = "-ra"
98+
addopts = "-r a --verbose"
9999
asyncio_default_fixture_loop_scope = "function"
100100
asyncio_mode = "auto"
101-
timeout = 300
101+
timeout = 1800
102102

103103
[tool.ty.environment]
104104
python-version = "3.10"
@@ -111,11 +111,11 @@ include = ["src", "tests", "scripts", "docs", "website"]
111111
clean = "rm -rf .coverage .pytest_cache .ruff_cache .ty_cache build dist htmlcov"
112112
install-sync = "uv sync --all-extras"
113113
install-dev = "uv sync --all-extras"
114-
build = "uv build --verbose"
115-
publish-to-pypi = "uv publish --verbose --token ${APIFY_PYPI_TOKEN_CRAWLEE}"
114+
build = "uv build"
115+
publish-to-pypi = "uv publish --token ${APIFY_PYPI_TOKEN_CRAWLEE}"
116116
type-check = "uv run ty check"
117-
unit-tests = "uv run pytest --numprocesses=auto --verbose --cov=src/apify_shared tests/unit"
118-
unit-tests-cov = "uv run pytest --numprocesses=auto --verbose --cov=src/apify_shared --cov-report=html tests/unit"
117+
unit-tests = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} --cov=src/apify_shared tests/unit"
118+
unit-tests-cov = "uv run pytest --numprocesses=${TESTS_CONCURRENCY:-auto} --cov=src/apify_shared --cov-report=html tests/unit"
119119
check-code = ["lint", "type-check", "unit-tests"]
120120

121121
[tool.poe.tasks.lint]

0 commit comments

Comments
 (0)