Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .github/workflows/_check_code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
name: Lint check
uses: apify/workflows/.github/workflows/python_lint_check.yaml@main
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
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"]'
13 changes: 6 additions & 7 deletions .github/workflows/_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ jobs:
unit_tests:
name: Unit tests
uses: apify/workflows/.github/workflows/python_unit_tests.yaml@main
secrets:
httpbin_url: ${{ secrets.APIFY_HTTPBIN_TOKEN && format('https://httpbin.apify.actor?token={0}', secrets.APIFY_HTTPBIN_TOKEN) || 'https://httpbin.org' }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
secrets: inherit
with:
python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
operating-systems: '["ubuntu-latest", "windows-latest", "macos-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", "macos-latest"]'
python_version_for_codecov: "3.14"
operating_system_for_codecov: ubuntu-latest
tests_concurrency: "2"
1 change: 1 addition & 0 deletions .github/workflows/on_schedule_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ concurrency:
env:
NODE_VERSION: 22
PYTHON_VERSION: 3.14
TESTS_CONCURRENCY: 1

jobs:
end_to_end_tests:
Expand Down
35 changes: 28 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ builtins-ignorelist = ["id"]
known-first-party = ["crawlee"]

[tool.pytest.ini_options]
addopts = "-ra"
addopts = "-r a --verbose"
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto"
timeout = 300
timeout = 1800
markers = [
"run_alone: marks tests that must run in isolation",
]
Expand Down Expand Up @@ -277,18 +277,39 @@ shell = "uv run ruff check --fix && uv run ruff format"

[tool.poe.tasks.unit-tests]
shell = """
uv run pytest --numprocesses=1 --verbose -m "run_alone" tests/unit && \
uv run pytest --numprocesses=auto --verbose -m "not run_alone" tests/unit
uv run pytest \
--numprocesses=1 \
-m "run_alone" \
tests/unit && \
uv run pytest \
--numprocesses=${TESTS_CONCURRENCY:-auto} \
-m "not run_alone" \
tests/unit
"""

[tool.poe.tasks.unit-tests-cov]
shell = """
uv run pytest --numprocesses=1 --verbose -m "run_alone" --cov=src/crawlee --cov-report=xml:coverage-unit.xml tests/unit && \
uv run pytest --numprocesses=auto --verbose -m "not run_alone" --cov=src/crawlee --cov-report=xml:coverage-unit.xml --cov-append tests/unit
uv run pytest \
--numprocesses=1 \
-m "run_alone" \
--cov=src/crawlee \
--cov-report=xml:coverage-unit.xml \
tests/unit && \
uv run pytest \
--numprocesses=${TESTS_CONCURRENCY:-auto} \
-m "not run_alone" \
--cov=src/crawlee \
--cov-report=xml:coverage-unit.xml \
--cov-append \
tests/unit
"""

[tool.poe.tasks.e2e-templates-tests]
cmd = "uv run pytest --numprocesses=${E2E_TESTS_CONCURRENCY:-1} --verbose tests/e2e/project_template --timeout=600"
cmd = """
uv run pytest \
--numprocesses=${TESTS_CONCURRENCY:-auto} \
tests/e2e/project_template
"""

[tool.poe.tasks.build-docs]
shell = "./build_api_reference.sh && corepack enable && yarn && yarn build"
Expand Down
Loading