Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/pre_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,27 @@ 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@add-code-cov-to-python
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"

async_docstrings:
name: Async dostrings check
uses: ./.github/workflows/_async_docstrings_check.yaml

integration_tests:
name: Integration tests
uses: apify/workflows/.github/workflows/python_integration_tests.yaml@main
uses: apify/workflows/.github/workflows/python_integration_tests.yaml@add-code-cov-to-python
secrets: inherit
with:
python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
python-versions: '["3.10", "3.14"]'
operating-systems: '["ubuntu-latest"]'
python-version-for-codecov: "3.14"
operating-system-for-codecov: "ubuntu-latest"

update_changelog:
name: Update changelog
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,10 @@ jobs:
with:
python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'

unit_tests:
name: Unit tests
uses: apify/workflows/.github/workflows/python_unit_tests.yaml@main
with:
python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'

async_docstrings:
name: Async dostrings check
uses: ./.github/workflows/_async_docstrings_check.yaml

integration_tests:
name: Integration tests
uses: apify/workflows/.github/workflows/python_integration_tests.yaml@main
secrets: inherit
with:
python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'

update_changelog:
name: Update changelog
needs: [release_metadata, lint_check, type_check, unit_tests, integration_tests]
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/run_code_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ 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@add-code-cov-to-python
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"

async_docstrings:
name: Async dostrings check
Expand All @@ -41,7 +45,10 @@ jobs:
integration_tests:
name: Integration tests
needs: [lint_check, type_check, unit_tests]
uses: apify/workflows/.github/workflows/python_integration_tests.yaml@main
with:
python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
uses: apify/workflows/.github/workflows/python_integration_tests.yaml@add-code-cov-to-python
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"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ build/
# Coverage reports
.coverage*
htmlcov
coverage-unit.xml
coverage-integration.xml

# IDE, editors
.vscode
Expand Down
31 changes: 25 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: clean install-dev build publish-to-pypi lint type-check unit-tests unit-tests-cov \
integration-tests format check-async-docstrings check-code fix-async-docstrings \
build-api-reference build-docs run-docs
.PHONY: clean install-dev build publish-to-pypi lint type-check unit-tests unit-tests-cov integration-tests \
integration-tests-cov format check-async-docstrings check-code fix-async-docstrings build-api-reference \
build-docs run-docs

# This is default for local testing, but GitHub workflows override it to a higher value in CI
INTEGRATION_TESTS_CONCURRENCY = 1
Expand All @@ -27,13 +27,32 @@ type-check:
uv run mypy

unit-tests:
uv run pytest --numprocesses=auto --verbose --cov=src/apify_client tests/unit
uv run pytest \
--numprocesses=auto \
--verbose \
tests/unit

unit-tests-cov:
uv run pytest --numprocesses=auto --verbose --cov=src/apify_client --cov-report=html tests/unit
uv run pytest \
--numprocesses=auto \
--verbose \
--cov=src/apify_client \
--cov-report=xml:coverage-unit.xml \
tests/unit

integration-tests:
uv run pytest --numprocesses=$(INTEGRATION_TESTS_CONCURRENCY) --verbose tests/integration
uv run pytest \
--numprocesses=$(INTEGRATION_TESTS_CONCURRENCY) \
--verbose \
tests/integration

integration-tests-cov:
uv run pytest \
--numprocesses=$(INTEGRATION_TESTS_CONCURRENCY) \
--verbose \
--cov=src/apify_client \
--cov-report=xml:coverage-integration.xml \
tests/integration

format:
uv run ruff check --fix
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<a href="https://pypi.org/project/apify-client/" rel="nofollow">
<img src="https://img.shields.io/pypi/dm/apify-client" alt="PyPI - Downloads" style="max-width: 100%;">
</a>
<a href="https://codecov.io/gh/apify/apify-client-python" >
<img src="https://codecov.io/gh/apify/apify-client-python/graph/badge.svg?token=TYQQWYYZ7A" alt="Code cov report" style="max-width: 100%;"/>
</a>
<a href="https://pypi.org/project/apify-client/" rel="nofollow">
<img src="https://img.shields.io/pypi/pyversions/apify-client" alt="PyPI - Python version" style="max-width: 100%;">
</a>
Expand Down