Skip to content

Commit d75e8fd

Browse files
authored
CI: Try running single_cpu/not single_cpu tests together (#52239)
* CI: Try running single_cpu/not single_cpu tests together * Update ubuntu.yml * Update ubuntu.yml * pre-commit fixes * Update ubuntu.yml * Update ubuntu.yml * Update ubuntu.yml * Update ubuntu.yml
1 parent f8de8d9 commit d75e8fd

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
@@ -26,7 +26,8 @@ jobs:
2626
strategy:
2727
matrix:
2828
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml, actions-311.yaml]
29-
pattern: ["not single_cpu", "single_cpu"]
29+
# Prevent the include jobs from overriding other jobs
30+
pattern: [""]
3031
pyarrow_version: ["8", "9", "10"]
3132
include:
3233
- name: "Downstream Compat"
@@ -100,7 +101,7 @@ jobs:
100101
PANDAS_COPY_ON_WRITE: ${{ matrix.pandas_copy_on_write || '0' }}
101102
PANDAS_CI: ${{ matrix.pandas_ci || '1' }}
102103
TEST_ARGS: ${{ matrix.test_args || '' }}
103-
PYTEST_WORKERS: ${{ contains(matrix.pattern, 'not single_cpu') && 'auto' || '1' }}
104+
PYTEST_WORKERS: 'auto'
104105
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}
105106
IS_PYPY: ${{ contains(matrix.env_file, 'pypy') }}
106107
# TODO: re-enable coverage on pypy, its slow
@@ -169,9 +170,22 @@ jobs:
169170
pyarrow-version: ${{ matrix.pyarrow_version }}
170171

171172
- name: Build Pandas
173+
id: build
172174
uses: ./.github/actions/build_pandas
173175

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

0 commit comments

Comments
 (0)