From 7fd3e9977e7dd0c04e4e72fdc65f59253f0e6281 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Sat, 11 Dec 2021 15:59:45 -0500 Subject: [PATCH] CI: Make sure correct version of python is used for testing. Cygwin is trying to use the highest-available Python version. One of the Python packages has scripts in /usr/bin that should be in the python39- subpackage. --- .ci/test.sh | 4 ++-- .github/workflows/test-cygwin.yml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.ci/test.sh b/.ci/test.sh index 8ff7c5f64..b0f019d66 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -2,6 +2,6 @@ set -e -python3 -c "from PIL import Image" +python3$1 -c "from PIL import Image" -python3 -bb -m pytest -v -x -W always --cov PIL --cov Tests --cov-report term Tests $REVERSE +python3$1 -bb -m pytest -v -x -W always --cov PIL --cov Tests --cov-report term Tests $REVERSE diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index 6215b72f8..bbe5eccee 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -53,7 +53,8 @@ jobs: - name: Test Pillow run: | - C:\tools\cygwin\bin\dash /usr/bin/xvfb-run -s '-screen 0 1024x768x24' .ci/test.sh + C:\tools\cygwin\bin\dash -c "mv .ci/test.sh .ci/test.sh.dos && /bin/tr -d '\r' <.ci/test.sh.dos >test.sh" + C:\tools\cygwin\bin\dash /usr/bin/xvfb-run -s '-screen 0 1024x768x24' .ci/test.sh .8 - name: After success run: |