juntossomosmais/request-id-django-log

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
sudo: false
language: python
dist: xenial
cache: pip
before_cache:
  - rm -f $HOME/.cache/pip/log/debug.log
python:
    - "2.7"
    - "3.5"
    - "3.6"
    - "3.7"
install: pip install tox-travis
script: tox
jobs:
  include:
    - stage: Coverage
      python:
          - "3.7"
      env:
        - TOXENV=coverage
      before_script:
        - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
        - chmod +x ./cc-test-reporter
        - ./cc-test-reporter before-build
      after_script:
        - ./cc-test-reporter after-build -d -t coverage.py --exit-code $TRAVIS_TEST_RESULT
    - stage: Deploy to Pypi
      if: NOT type IN (pull_request) AND branch = master
      python:
          - "3.7"
      env:
        - TOXENV=django21
      deploy:
        provider: pypi
        user: jsmpypi
        password: $PYPIPASSWORD
        on:
          branch: master
        distributions: sdist bdist_wheel

    - stage: Deploy to Pypi Test Server
      if: NOT type IN (pull_request) AND branch = develop
      python:
          - "3.7"
      env:
        - TOXENV=django21
      deploy:
        provider: pypi
        user: jsmpypi
        password: $PYPIPASSWORDTEST
        on:
          branch: develop
        distributions: sdist bdist_wheel
        server: https://test.pypi.org/legacy/