44 workflow_call :
55 secrets :
66 APIFY_TEST_USER_PYTHON_SDK_API_TOKEN :
7- description : API token of the Python testing user on Apify
7+ description : Apify API token for the primary Python SDK test user.
88 required : true
99 APIFY_TEST_USER_2_API_TOKEN :
10- description : Second API token of different testing user on Apify. For multi-user test cases, such as sharing restricted access storage.
10+ description : Apify API token for a secondary test user, used in multi-user scenarios (e.g. sharing restricted storage) .
1111 required : false
12-
12+ CODECOV_TOKEN :
13+ required : true
14+ description : Token for uploading coverage reports to Codecov.
1315 inputs :
1416 python-versions :
15- description : List of Python versions to be used
17+ description : List of Python versions to be used (stringified JSON array).
18+ required : true
19+ type : string
20+ operating-systems :
21+ description : List of operating systems to be used.
22+ required : true
23+ type : string
24+ python-version-for-codecov :
25+ description : Python version to be used for codecov upload.
26+ required : true
27+ type : string
28+ operating-system-for-codecov :
29+ description : Operating system to be used for codecov upload.
1630 required : true
1731 type : string
1832
@@ -25,34 +39,46 @@ jobs:
2539 # Job to run integration tests from the main repository.
2640 integration_tests :
2741 name : Integration tests
28- runs-on : ubuntu-latest
42+
2943 # Run this only for PRs from the main repository or for pushes to master. Skip otherwise.
3044 if : github.event.pull_request.head.repo.owner.login == 'apify' || github.ref == 'refs/heads/master'
3145
3246 strategy :
3347 matrix :
34- python-version : ${{ fromJSON(inputs.python-versions)}}
48+ os : ${{ fromJSON(inputs.operating-systems) }}
49+ python-version : ${{ fromJSON(inputs.python-versions) }}
3550 max-parallel : 1 # No parallel tests to avoid exceeding API limits.
3651
52+ runs-on : ${{ matrix.os }}
53+
3754 steps :
3855 - name : Checkout repository
39- uses : actions/checkout@v4
56+ uses : actions/checkout@v6
4057
4158 - name : Set up Python ${{ matrix.python-version }}
42- uses : actions/setup-python@v5
59+ uses : actions/setup-python@v6
4360 with :
4461 python-version : ${{ matrix.python-version }}
4562
4663 - name : Set up uv package manager
47- uses : astral-sh/setup-uv@v6
64+ uses : astral-sh/setup-uv@v7
4865 with :
4966 python-version : ${{ matrix.python-version }}
5067
5168 - name : Install Python dependencies
5269 run : make install-dev
5370
5471 - name : Run integration tests
55- run : make INTEGRATION_TESTS_CONCURRENCY=8 integration-tests
72+ run : make INTEGRATION_TESTS_CONCURRENCY=8 integration-tests-cov
5673 env :
5774 APIFY_TEST_USER_API_TOKEN : ${{ secrets.APIFY_TEST_USER_PYTHON_SDK_API_TOKEN }}
5875 APIFY_TEST_USER_2_API_TOKEN : ${{ secrets.APIFY_TEST_USER_2_API_TOKEN }}
76+
77+ # Upload coverage only for the latest Python to avoid redundant uploads.
78+ - name : Upload integration test coverage
79+ if : ${{ matrix.os == inputs.operating-system-for-codecov && matrix.python-version == inputs.python-version-for-codecov }}
80+ uses : codecov/codecov-action@v5
81+ with :
82+ token : ${{ secrets.CODECOV_TOKEN }}
83+ files : coverage-integration.xml
84+ flags : integration
0 commit comments