Skip to content

Commit ba24375

Browse files
authored
[CI] Address problems with cygwin (#4832)
2 parents a3cc40f + 9d6ade8 commit ba24375

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/main.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ jobs:
182182
packages: >-
183183
python${{ matrix.python }},
184184
python${{ matrix.python }}-devel,
185-
python${{ matrix.python }}-tox,
185+
python${{ matrix.python }}-pip,
186186
gcc-core,
187187
git,
188188
- name: Record the currently selected Python version
@@ -193,11 +193,17 @@ jobs:
193193
run: |
194194
python -c 'import platform; print("python-version=" + platform.python_version())' >> ${GITHUB_OUTPUT}
195195
shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0}
196+
- name: Install tox using pip
197+
shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0}
198+
run: |
199+
# Workaround for https://github.com/pypa/setuptools/issues/4831
200+
python -m pip install tox
196201
- name: Run tests
197202
shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0}
198203
run: |
199-
git config --global --add safe.directory "$(cygpath -u "$GITHUB_WORKSPACE")" # workaround for #3408
200-
tox
204+
git config --global --add safe.directory "$(cygpath -u "${{ github.workspace }}")" # workaround for #3408
205+
echo "$(cygpath -u "${{ github.workspace }}")" # for debugging purposes
206+
python -m tox
201207
- name: Create coverage report
202208
if: hashFiles('.coverage') != '' # Rudimentary `file.exists()`
203209
run: |

0 commit comments

Comments
 (0)