.travis.yml

Summary

Maintainability
Test Coverage
sudo: false
language: python
dist: xenial

env:
  global:
  - PATH=$HOME/.local/bin:$PATH
  - AWS_DEFAULT_REGION=us-east-1
  - secure: "inURdx4ldkJqQXL1TyvKImC3EnL5TixC1DlNMBYi5ttygwAk+mSSSw8Yc7klB6D1m6q79xUlHRk06vbz23CsXTM4AClC5Emrk6XN2GlUKl5WI+z+A2skI59buEhLWe7e2KzhB/AVx2E3TfKa0oY7raM0UUnaOkpV1Cj+mHKPIT0="
  - secure: "H32DV3713a6UUuEJujrG7SfUX4/5WrwQy/3DxeptC6L7YPlTYxHBdEsccTfN5z806EheIl4BdIoxoDtq7PU/tWQoG1Lp2ze60mpwrniHajhFnjk7zP6pHvkhGLr8flhSmAb6CQBreNFOHTLWBMGPfi7k1Q9Td9MHbRo/FsTxqsM="

stages:
- test
- name: coverage
- name: deploy
  if: tag IS present

services:
- postgresql

install:
- pip install awscli
- pip install -r requires/testing.txt
- python setup.py develop

script: nosetests

after_success:
 - aws s3 cp .coverage "s3://com-gavinroy-travis/queries/$TRAVIS_BUILD_NUMBER/.coverage.${TRAVIS_PYTHON_VERSION}"

jobs:
  include:
   - python: 2.7
   - python: 3.4
   - python: 3.5
   - python: 3.6
   - python: 3.7
   - python: 3.8
   - stage: coverage
     if: repo = gmr/queries
     services: []
     python: 3.7
     install:
     - pip install awscli coverage codecov
     script:
     - mkdir coverage
     - aws s3 cp --recursive s3://com-gavinroy-travis/queries/$TRAVIS_BUILD_NUMBER/
       coverage
     - cd coverage
     - coverage combine
     - cd ..
     - mv coverage/.coverage .
     - coverage report
     after_success: codecov
   - stage: deploy
     if: repo = gmr/queries
     python: 3.6
     services: []
     install: true
     script: true
     after_success: true
     deploy:
       distributions: sdist bdist_wheel
       provider: pypi
       user: crad
       on:
         tags: true
         all_branches: true
       password:
         secure: UWQWui+QhAL1cz6oW/vqjEEp6/EPn1YOlItNJcWHNOO/WMMOlaTVYVUuXp+y+m52B+8PtYZZCTHwKCUKe97Grh291FLxgd0RJCawA40f4v1gmOFYLNKyZFBGfbC69/amxvGCcDvOPtpChHAlTIeokS5EQneVcAhXg2jXct0HTfI=