mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-30 23:47:27 +03:00 
			
		
		
		
	Run lint in own job, but don't let it fail build
This commit is contained in:
		
							parent
							
								
									bada6be2db
								
							
						
					
					
						commit
						cadfbed43b
					
				
							
								
								
									
										37
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										37
									
								
								.travis.yml
									
									
									
									
									
								
							|  | @ -6,13 +6,18 @@ cache: pip | |||
| notifications: | ||||
|   irc: "chat.freenode.net#pil" | ||||
| 
 | ||||
| # Run slow PyPy* first, to give them a headstart and reduce waiting time. | ||||
| # Run fast lint first to get fast feedback. | ||||
| # Run slow PyPy* next, to give them a headstart and reduce waiting time. | ||||
| # Run latest 3.x and 2.x next, to get quick compatibility results. | ||||
| # Then run the remainder, with fastest Docker jobs last. | ||||
| 
 | ||||
| matrix: | ||||
|   fast_finish: true | ||||
|   include: | ||||
|     - python: "3.6" | ||||
|       name: "Lint" | ||||
|       env: LINT="true" | ||||
|       sudo: false | ||||
|     - python: "pypy" | ||||
|       name: "PyPy Trusty" | ||||
|       dist: trusty | ||||
|  | @ -62,7 +67,12 @@ services: | |||
|   - docker | ||||
| 
 | ||||
| install: | ||||
|   - if [ "$DOCKER" == "" ]; then .travis/install.sh; fi | ||||
|   - | | ||||
|     if [ "$LINT" == "true" ]; then | ||||
|       pip install -U flake8 | ||||
|     elif [ "$DOCKER" == "" ]; then | ||||
|       .travis/install.sh; | ||||
|     fi | ||||
| 
 | ||||
| before_install: | ||||
|   - if [ "$DOCKER" ]; then travis_retry docker pull pythonpillow/$DOCKER:$DOCKER_TAG; fi | ||||
|  | @ -73,14 +83,19 @@ before_script: | |||
|   - "sh -e /etc/init.d/xvfb start" | ||||
| 
 | ||||
| script: | ||||
|   - | | ||||
|        if [ "$DOCKER" == "" ]; then | ||||
|           .travis/script.sh | ||||
|        else | ||||
|           # the Pillow user in the docker container is UID 1000 | ||||
|           sudo chown -R 1000 $TRAVIS_BUILD_DIR | ||||
|           docker run -v $TRAVIS_BUILD_DIR:/Pillow pythonpillow/$DOCKER:$DOCKER_TAG | ||||
|        fi | ||||
| - | | ||||
|   if [ "$DOCKER" == "" ] && [ "$LINT" == "" ]; then | ||||
|     .travis/script.sh | ||||
|   elif [ "$DOCKER" ]; then | ||||
|     # the Pillow user in the docker container is UID 1000 | ||||
|     sudo chown -R 1000 $TRAVIS_BUILD_DIR | ||||
|     docker run -v $TRAVIS_BUILD_DIR:/Pillow pythonpillow/$DOCKER:$DOCKER_TAG | ||||
|   fi | ||||
| 
 | ||||
| after_success: | ||||
|   - .travis/after_success.sh | ||||
| - | | ||||
|   if [ "$LINT" == "true" ]; then | ||||
|     flake8 --statistics --count | ||||
|   else | ||||
|     .travis/after_success.sh | ||||
|   fi | ||||
|  |  | |||
|  | @ -15,15 +15,6 @@ pip install coveralls-merge | |||
| coveralls-merge coverage.c.json | ||||
| codecov | ||||
| 
 | ||||
| if [ "$DOCKER" == "" ]; then | ||||
|     pip install pyflakes pycodestyle | ||||
|     pyflakes *.py | tee >(wc -l) | ||||
|     pyflakes src/PIL/*.py | tee >(wc -l) | ||||
|     pyflakes Tests/*.py | tee >(wc -l) | ||||
|     pycodestyle --statistics --count src/PIL/*.py | ||||
|     pycodestyle --statistics --count Tests/*.py | ||||
| fi | ||||
| 
 | ||||
| if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ] && [ "$DOCKER" == "" ]; then | ||||
|     # Coverage and quality reports on just the latest diff. | ||||
|     # (Installation is very slow on Py3, so just do it for Py2.) | ||||
|  |  | |||
|  | @ -1,3 +1,4 @@ | |||
| #!/usr/bin/env bash | ||||
| # Fetch the remote master branch before running diff-cover on Travis CI. | ||||
| # https://github.com/Bachmann1234/diff-cover#troubleshooting | ||||
| git fetch origin master:refs/remotes/origin/master | ||||
|  |  | |||
|  | @ -1,3 +1,4 @@ | |||
| #!/usr/bin/env bash | ||||
| coverage xml | ||||
| diff-cover coverage.xml | ||||
| diff-quality --violation=pyflakes | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user