2017-11-04 23:47:46 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								language: python
							 | 
						
					
						
							
								
									
										
										
										
											2019-05-03 18:16:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								dist: xenial
							 | 
						
					
						
							
								
									
										
										
										
											2017-11-04 23:47:46 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2018-06-17 21:24:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# 3.6 is listed first so it gets used for the later build stages
							 | 
						
					
						
							
								
									
										
										
										
											2017-11-04 23:47:46 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								python:
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-12 17:36:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  - "3.6"
							 | 
						
					
						
							
								
									
										
										
										
											2019-05-03 18:16:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  - "3.7"
							 | 
						
					
						
							
								
									
										
										
										
											2019-11-11 03:45:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  - "3.8"
							 | 
						
					
						
							
								
									
										
										
										
											2017-11-04 23:47:46 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2018-06-17 21:24:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# Executed for 3.5 AND 3.5 as the first "test" stage:
							 | 
						
					
						
							
								
									
										
										
										
											2017-11-04 23:47:46 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								script:
							 | 
						
					
						
							
								
									
										
										
										
											2018-06-24 01:03:46 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  - pip install -U pip wheel
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  - pip install .[test]
							 | 
						
					
						
							
								
									
										
										
										
											2019-05-25 16:19:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  - pytest
							 | 
						
					
						
							
								
									
										
										
										
											2018-06-24 01:03:46 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								cache:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    directories:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        - $HOME/.cache/pip
							 | 
						
					
						
							
								
									
										
										
										
											2018-06-17 21:24:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# This defines further stages that execute after the tests
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								jobs:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  include:
							 | 
						
					
						
							
								
									
										
										
										
											2018-06-17 22:19:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    - stage: release tagged version
							 | 
						
					
						
							
								
									
										
										
										
											2019-07-07 20:03:19 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      if: tag IS present
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      python: 3.6
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      deploy:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        - provider: pypi
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          user: simonw
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          distributions: bdist_wheel
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          password: ${PYPI_PASSWORD}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          on:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            branch: master
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            tags: true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    - stage: publish docker image
							 | 
						
					
						
							
								
									
										
										
										
											2018-06-17 22:19:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      if: tag IS present
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      python: 3.6
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      script:
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-24 04:17:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        # Build and release to Docker Hub
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-24 04:48:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        - docker login -u $DOCKER_USER -p $DOCKER_PASS
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-24 04:17:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        - export REPO=datasetteproject/datasette
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        - docker build -f Dockerfile -t $REPO:$TRAVIS_TAG .
							 | 
						
					
						
							
								
									
										
										
										
											2018-09-19 18:23:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        - docker tag $REPO:$TRAVIS_TAG $REPO:latest
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-24 04:17:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        - docker push $REPO
							 |