Skip to content

Commit

Permalink
Merge pull request #5029 from hugovk/less-travis
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Nov 18, 2020
2 parents ce70a3d + 409877d commit 626051f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 49 deletions.
6 changes: 3 additions & 3 deletions .ci/install.sh
Expand Up @@ -39,13 +39,13 @@ if [ "$GHA_PYTHON_VERSION" == "3.8" ]; then python3 -m pip install -U "setuptool
if [ "$GHA_PYTHON_VERSION" == "3.9" ]; then python3 -m pip install -U "setuptools>=49.3.2" ; fi
if [ "$TRAVIS_PYTHON_VERSION" == "pypy3.6-7.3.1" ]; then python3 -m pip install -U "setuptools>=49.3.2" ; fi

if [[ $TRAVIS_PYTHON_VERSION == 3.* ]]; then
# PyQt5 doesn't support PyPy3
# Wheel doesn't yet support 3.10
if [[ $GHA_PYTHON_VERSION == 3.* && $GHA_PYTHON_VERSION != "3.10-dev" ]]; then
# arm64, ppc64le, s390x CPUs:
# "ERROR: Could not find a version that satisfies the requirement pyqt5"
if [[ $TRAVIS_CPU_ARCH == "amd64" ]]; then
sudo apt-get -qq install libxcb-xinerama0 pyqt5-dev-tools
python3 -m pip install pyqt5
fi
fi

# docs only on Python 3.9
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/test.yml
Expand Up @@ -22,9 +22,9 @@ jobs:
]
include:
- python-version: "3.6"
env: PYTHONOPTIMIZE=1
PYTHONOPTIMIZE: 1
- python-version: "3.7"
env: PYTHONOPTIMIZE=2
PYTHONOPTIMIZE: 2
# Include new variables for Codecov
- os: ubuntu-latest
codecov-flag: GHA_Ubuntu
Expand Down Expand Up @@ -79,7 +79,13 @@ jobs:
- name: Test
run: |
.ci/test.sh
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
xvfb-run -s '-screen 0 1024x768x24' .ci/test.sh
else
.ci/test.sh
fi
env:
PYTHONOPTIMIZE: ${{ matrix.PYTHONOPTIMIZE }}

- name: Prepare to upload errors
if: failure()
Expand Down
46 changes: 4 additions & 42 deletions .travis.yml
@@ -1,67 +1,29 @@
dist: xenial
language: python
cache:
pip: true
directories:
- $HOME/.cache/pre-commit
cache: pip

notifications:
irc: "chat.freenode.net#pil"

# Run fast lint first to get fast feedback.
# Run slower CPUs next, to give them a headstart and reduce waiting time.
# Then run the remainder.

matrix:
fast_finish: true
include:
- python: "3.6"
name: "Lint"
env: LINT="true"

- python: "3.6"
arch: arm64
- python: "3.7"
arch: ppc64le
- python: "3.8"
arch: s390x

- python: "pypy3.6-7.3.1"
name: "PyPy3 Xenial"
- python: "3.9"
name: "3.9 Xenial"
services: xvfb
- python: "3.8"
name: "3.8 Xenial"
services: xvfb
- python: '3.7'
name: "3.7 Xenial PYTHONOPTIMIZE=2"
env: PYTHONOPTIMIZE=2
services: xvfb
- python: '3.6'
name: "3.6 Xenial PYTHONOPTIMIZE=1"
env: PYTHONOPTIMIZE=1
services: xvfb

install:
- |
if [ "$LINT" == "true" ]; then
python3 -m pip install tox
else
.ci/install.sh;
fi
.ci/install.sh;
script:
- |
if [ "$LINT" == "true" ]; then
tox -e lint
else
- |
.ci/build.sh
.ci/test.sh
fi
after_success:
- |
if [ "$LINT" == "" ]; then
- |
.ci/after_success.sh
fi
2 changes: 1 addition & 1 deletion Tests/test_image_quantize.py
Expand Up @@ -21,7 +21,7 @@ def test_libimagequant_quantize():
image = hopper()
try:
converted = image.quantize(100, Image.LIBIMAGEQUANT)
except ValueError as ex:
except ValueError as ex: # pragma: no cover
if "dependency" in str(ex).lower():
pytest.skip("libimagequant support not available")
else:
Expand Down

0 comments on commit 626051f

Please sign in to comment.