Skip to content

Commit 8a7eb70

Browse files
vdusekclaude
andcommitted
ci: remove concurrency limits from integration and e2e test jobs
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>
1 parent e63343c commit 8a7eb70

File tree

1 file changed

+110
-19
lines changed

1 file changed

+110
-19
lines changed

.github/workflows/_tests.yaml

Lines changed: 110 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,115 @@ jobs:
2020
tests_concurrency: "1"
2121

2222
integration_tests:
23-
name: Integration tests
24-
uses: apify/workflows/.github/workflows/python_integration_tests.yaml@main
25-
secrets: inherit
26-
with:
27-
python_versions: '["3.10", "3.14"]'
28-
operating_systems: '["ubuntu-latest"]'
29-
python_version_for_codecov: "3.14"
30-
operating_system_for_codecov: ubuntu-latest
31-
tests_concurrency: "16"
23+
name: Integration tests (${{ matrix.python-version }}, ${{ matrix.os }})
24+
25+
if: >-
26+
${{
27+
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login == 'apify') ||
28+
(github.event_name == 'push' && github.ref == 'refs/heads/master')
29+
}}
30+
31+
strategy:
32+
matrix:
33+
os: ["ubuntu-latest"]
34+
python-version: ["3.10", "3.14"]
35+
36+
runs-on: ${{ matrix.os }}
37+
38+
env:
39+
TESTS_CONCURRENCY: "16"
40+
41+
steps:
42+
- name: Checkout repository
43+
uses: actions/checkout@v6
44+
45+
- name: Set up Python ${{ matrix.python-version }}
46+
uses: actions/setup-python@v6
47+
with:
48+
python-version: ${{ matrix.python-version }}
49+
50+
- name: Set up uv package manager
51+
uses: astral-sh/setup-uv@v7
52+
with:
53+
python-version: ${{ matrix.python-version }}
54+
55+
- name: Install Python dependencies
56+
run: uv run poe install-dev
57+
58+
- name: Run integration tests
59+
run: uv run poe integration-tests-cov
60+
env:
61+
APIFY_TEST_USER_API_TOKEN: ${{ secrets.APIFY_TEST_USER_PYTHON_SDK_API_TOKEN }}
62+
APIFY_TEST_USER_2_API_TOKEN: ${{ secrets.APIFY_TEST_USER_2_API_TOKEN }}
63+
64+
- name: Upload integration test coverage
65+
if: >-
66+
${{
67+
matrix.os == 'ubuntu-latest' &&
68+
matrix.python-version == '3.14' &&
69+
env.CODECOV_TOKEN != ''
70+
}}
71+
uses: codecov/codecov-action@v5
72+
env:
73+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
74+
with:
75+
token: ${{ env.CODECOV_TOKEN }}
76+
files: coverage-integration.xml
77+
flags: integration
3278

3379
e2e_tests:
34-
name: E2E tests
35-
uses: apify/workflows/.github/workflows/python_integration_tests.yaml@main
36-
secrets: inherit
37-
with:
38-
python_versions: '["3.10", "3.14"]'
39-
operating_systems: '["ubuntu-latest"]'
40-
python_version_for_codecov: "3.14"
41-
operating_system_for_codecov: ubuntu-latest
42-
run_tests_command: "uv run poe e2e-tests-cov"
43-
tests_concurrency: "16"
80+
name: E2E tests (${{ matrix.python-version }}, ${{ matrix.os }})
81+
82+
if: >-
83+
${{
84+
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login == 'apify') ||
85+
(github.event_name == 'push' && github.ref == 'refs/heads/master')
86+
}}
87+
88+
strategy:
89+
matrix:
90+
os: ["ubuntu-latest"]
91+
python-version: ["3.10", "3.14"]
92+
93+
runs-on: ${{ matrix.os }}
94+
95+
env:
96+
TESTS_CONCURRENCY: "16"
97+
98+
steps:
99+
- name: Checkout repository
100+
uses: actions/checkout@v6
101+
102+
- name: Set up Python ${{ matrix.python-version }}
103+
uses: actions/setup-python@v6
104+
with:
105+
python-version: ${{ matrix.python-version }}
106+
107+
- name: Set up uv package manager
108+
uses: astral-sh/setup-uv@v7
109+
with:
110+
python-version: ${{ matrix.python-version }}
111+
112+
- name: Install Python dependencies
113+
run: uv run poe install-dev
114+
115+
- name: Run E2E tests
116+
run: uv run poe e2e-tests-cov
117+
env:
118+
APIFY_TEST_USER_API_TOKEN: ${{ secrets.APIFY_TEST_USER_PYTHON_SDK_API_TOKEN }}
119+
APIFY_TEST_USER_2_API_TOKEN: ${{ secrets.APIFY_TEST_USER_2_API_TOKEN }}
120+
121+
- name: Upload E2E test coverage
122+
if: >-
123+
${{
124+
matrix.os == 'ubuntu-latest' &&
125+
matrix.python-version == '3.14' &&
126+
env.CODECOV_TOKEN != ''
127+
}}
128+
uses: codecov/codecov-action@v5
129+
env:
130+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
131+
with:
132+
token: ${{ env.CODECOV_TOKEN }}
133+
files: coverage-e2e.xml
134+
flags: e2e

0 commit comments

Comments
 (0)