Skip to content

Commit 6c1756c

Browse files
Backport PR #52239 on branch 2.0.x (CI: Try running single_cpu/not single_cpu tests together) (#52292)
Backport PR #52239: CI: Try running single_cpu/not single_cpu tests together Co-authored-by: Thomas Li <[email protected]>
1 parent f7917ca commit 6c1756c

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.github/workflows/ubuntu.yml

+17-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ jobs:
2525
strategy:
2626
matrix:
2727
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml, actions-311.yaml]
28-
pattern: ["not single_cpu", "single_cpu"]
28+
# Prevent the include jobs from overriding other jobs
29+
pattern: [""]
2930
pyarrow_version: ["8", "9", "10"]
3031
include:
3132
- name: "Downstream Compat"
@@ -99,7 +100,7 @@ jobs:
99100
PANDAS_COPY_ON_WRITE: ${{ matrix.pandas_copy_on_write || '0' }}
100101
PANDAS_CI: ${{ matrix.pandas_ci || '1' }}
101102
TEST_ARGS: ${{ matrix.test_args || '' }}
102-
PYTEST_WORKERS: ${{ contains(matrix.pattern, 'not single_cpu') && 'auto' || '1' }}
103+
PYTEST_WORKERS: 'auto'
103104
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}
104105
IS_PYPY: ${{ contains(matrix.env_file, 'pypy') }}
105106
# TODO: re-enable coverage on pypy, its slow
@@ -168,9 +169,22 @@ jobs:
168169
pyarrow-version: ${{ matrix.pyarrow_version }}
169170

170171
- name: Build Pandas
172+
id: build
171173
uses: ./.github/actions/build_pandas
172174

173-
- name: Test
175+
- name: Test (not single_cpu)
174176
uses: ./.github/actions/run-tests
175177
# TODO: Don't continue on error for PyPy
176178
continue-on-error: ${{ env.IS_PYPY == 'true' }}
179+
env:
180+
# Set pattern to not single_cpu if not already set
181+
PATTERN: ${{ env.PATTERN == '' && 'not single_cpu' || matrix.pattern }}
182+
183+
- name: Test (single_cpu)
184+
uses: ./.github/actions/run-tests
185+
# TODO: Don't continue on error for PyPy
186+
continue-on-error: ${{ env.IS_PYPY == 'true' }}
187+
env:
188+
PATTERN: 'single_cpu'
189+
PYTEST_WORKERS: 1
190+
if: ${{ matrix.pattern == '' && (always() && steps.build.outcome == 'success')}}

0 commit comments

Comments
 (0)