test: split integration tests into integration and e2e suites#781
test: split integration tests into integration and e2e suites#781
Conversation
Move Actor-based tests (which build and deploy Actors on the Apify platform) from tests/integration/actor/ to tests/e2e/, and flatten tests/integration/apify_api/ into tests/integration/. This gives a clearer separation: integration tests make real API calls but run locally, while e2e tests require building/deploying Actors on the platform. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #781 +/- ##
==========================================
- Coverage 81.86% 81.78% -0.08%
==========================================
Files 46 46
Lines 2696 2696
==========================================
- Hits 2207 2205 -2
- Misses 489 491 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
All three test directories (unit, integration, e2e) now have READMEs with a consistent structure: description, running instructions, and key fixtures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The reusable workflow `python_integration_tests.yaml` enforces `concurrency: integration_tests` and `max-parallel: 1`, which meant only one test matrix job could run at a time across both integration and e2e suites. Inline the job definitions to remove both limitations. All matrix combinations now run in parallel. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
E2E tests build and run Actors on the Apify platform, which can exceed the account memory limit when multiple matrix jobs run concurrently. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
What problem does this actually solve? |
https://apify.slack.com/archives/C06ENBV1B9Q/p1770812487540959 |
|
|
||
| if: >- | ||
| ${{ | ||
| (github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login == 'apify') || |
There was a problem hiding this comment.
What problem does the owner check solve? Tests don't run in forks, do they?
There was a problem hiding this comment.
They don't, thanks to this condition (they are skipped). Otherwise, they would be executed, and they would fail.
| name: Integration tests (${{ matrix.python-version }}, ${{ matrix.os }}) | ||
|
|
||
| if: >- | ||
| ${{ |
There was a problem hiding this comment.
I don't think these braces are necessary in this context, but I may be wrong.
There was a problem hiding this comment.
It is copied from the apify/workflows, and we know it works, so I would probably stay with that 🙂.
Summary
tests/integration/actor/totests/e2e/tests/integration/apify_api/intotests/integration/(removed unnecessary nesting)tests/e2e/conftest.pymerging fixtures fromtests/integration/conftest.pyand the oldtests/integration/actor/conftest.pye2e-testsande2e-tests-covpoe tasks inpyproject.tomle2e_testsCI job in.github/workflows/_tests.yamlThis gives a clearer separation:
tests/integration/): Make real API calls but run locally, no Actor builds neededtests/e2e/): Build and deploy Actors on the Apify platformTest collection: 77 integration + 64 e2e = 141 total (unchanged).
Relates: #785
Test plan
uv run poe lint— passesuv run poe unit-tests— 249 tests passuv run pytest --collect-only tests/integration— 77 tests collecteduv run pytest --collect-only tests/e2e— 64 tests collected🤖 Generated with Claude Code