Skip to content

Commit e651dc1

Browse files
committed
ci(tox): Disable parallel test in Windows
uv and tox-uv only helps non-Windows platform. Concurrent cache access from multiple tox env causes random OSError in multiple pre-test stages.
1 parent d7b1aeb commit e651dc1

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/test_inc.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,13 @@ jobs:
108108
--with tox-uv
109109
110110
111-
# 1. Trigger npm install pyright once, otherwise
111+
# Trigger npm install pyright once, otherwise
112112
# tox run-parallel would cause multiple concurrent
113113
# installation into same location and fail
114114
# RobertCraigie/pyright-python#318
115-
# 2. Tox-uv wreak havoc on the platform that needs it
116-
# most (Windows) under concurrent cache access. So
117-
# prepare the venvs one by one and only do tests
118-
# in parallel.
119115
- name: Prepare test environment
120116
run: |
121117
uvx tox run -e pyright -- --version
122-
uvx tox run -v --skip-env='.*-stub$' --notest
123118
124119
# Glob not supported under default windows env
125120
- name: Determine wheel file name
@@ -129,13 +124,27 @@ jobs:
129124
echo "filename=$(echo dist/*.whl)" >> "$GITHUB_OUTPUT"
130125
131126
- name: Test runtime
127+
if: runner.os != 'Windows'
132128
run: >
133129
uvx
134130
tox run-parallel -vv
135131
--skip-env='.*-stub$'
136132
--installpkg ${{ steps.wheel-name.outputs.filename }}
137133
--result-json test-${{ inputs.flavor }}-rt-${{ matrix.os }}-py${{ matrix.pyver }}.json
138134
135+
# Tox-uv wreak havoc on the platform that needs it
136+
# most (Windows) under concurrent cache access,
137+
# which can potentially occur at every tox setup
138+
# steps before pytest. No workaround so far.
139+
- name: Test runtime (serially)
140+
if: runner.os == 'Windows'
141+
run: >
142+
uvx
143+
tox run -v
144+
--skip-env='.*-stub$'
145+
--installpkg ${{ steps.wheel-name.outputs.filename }}
146+
--result-json test-${{ inputs.flavor }}-rt-${{ matrix.os }}-py${{ matrix.pyver }}.json
147+
139148
- uses: actions/upload-artifact@v4
140149
with:
141150
name: log-${{ inputs.flavor }}-rt-${{ matrix.os }}-py${{ matrix.pyver }}

0 commit comments

Comments
 (0)