Merge pull request #5029 from hugovk/less-travis

This commit is contained in:
Hugo van Kemenade 2020-11-18 10:21:36 +02:00 committed by GitHub
commit 626051f24f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 49 deletions

View File

@ -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 [ "$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" == "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: # arm64, ppc64le, s390x CPUs:
# "ERROR: Could not find a version that satisfies the requirement pyqt5" # "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 sudo apt-get -qq install libxcb-xinerama0 pyqt5-dev-tools
python3 -m pip install pyqt5 python3 -m pip install pyqt5
fi
fi fi
# docs only on Python 3.9 # docs only on Python 3.9

View File

@ -22,9 +22,9 @@ jobs:
] ]
include: include:
- python-version: "3.6" - python-version: "3.6"
env: PYTHONOPTIMIZE=1 PYTHONOPTIMIZE: 1
- python-version: "3.7" - python-version: "3.7"
env: PYTHONOPTIMIZE=2 PYTHONOPTIMIZE: 2
# Include new variables for Codecov # Include new variables for Codecov
- os: ubuntu-latest - os: ubuntu-latest
codecov-flag: GHA_Ubuntu codecov-flag: GHA_Ubuntu
@ -79,7 +79,13 @@ jobs:
- name: Test - name: Test
run: | 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 - name: Prepare to upload errors
if: failure() if: failure()

View File

@ -1,24 +1,13 @@
dist: xenial dist: xenial
language: python language: python
cache: cache: pip
pip: true
directories:
- $HOME/.cache/pre-commit
notifications: notifications:
irc: "chat.freenode.net#pil" 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: matrix:
fast_finish: true fast_finish: true
include: include:
- python: "3.6"
name: "Lint"
env: LINT="true"
- python: "3.6" - python: "3.6"
arch: arm64 arch: arm64
- python: "3.7" - python: "3.7"
@ -26,42 +15,15 @@ matrix:
- python: "3.8" - python: "3.8"
arch: s390x 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: install:
- | - |
if [ "$LINT" == "true" ]; then .ci/install.sh;
python3 -m pip install tox
else
.ci/install.sh;
fi
script: script:
- | - |
if [ "$LINT" == "true" ]; then
tox -e lint
else
.ci/build.sh .ci/build.sh
.ci/test.sh .ci/test.sh
fi
after_success: after_success:
- | - |
if [ "$LINT" == "" ]; then
.ci/after_success.sh .ci/after_success.sh
fi

View File

@ -21,7 +21,7 @@ def test_libimagequant_quantize():
image = hopper() image = hopper()
try: try:
converted = image.quantize(100, Image.LIBIMAGEQUANT) converted = image.quantize(100, Image.LIBIMAGEQUANT)
except ValueError as ex: except ValueError as ex: # pragma: no cover
if "dependency" in str(ex).lower(): if "dependency" in str(ex).lower():
pytest.skip("libimagequant support not available") pytest.skip("libimagequant support not available")
else: else: