rycus86/prometheus_flask_exporter

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: python
dist: xenial
python:
- '3.7'
- '3.6'
- '3.5'
- '3.4'
- '2.7'

install: skip
before_script:
  # prepare reporters
  - pip install coveralls
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
  - chmod +x ./cc-test-reporter
  # install module
  - pip install . --upgrade
script:
  # python tests
  - python -m coverage run --branch --source=prometheus_flask_exporter -m unittest discover -s tests -v
after_script:
  # coverage reports
  - python -m coverage report -m
  - python -m coverage xml
  - |
    if [[ "$(python --version 2>&1)" = *3.7* ]]; then
      coveralls || exit 0
      ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT || exit 0
    fi

jobs:
  include:
  - &integration-stage
    stage: integration
    sudo: true
    before_script: skip
    after_script: skip
    script:
      - sh examples/${TEST_NAME}/run_tests.sh
    env: TEST_NAME=gunicorn

  - <<: *integration-stage
    env: TEST_NAME=gunicorn-internal

  - <<: *integration-stage
    env: TEST_NAME=gunicorn-app-factory

  - <<: *integration-stage
    env: TEST_NAME=uwsgi

  - <<: *integration-stage
    env: TEST_NAME=uwsgi-lazy-apps

  - <<: *integration-stage
    env: TEST_NAME=wsgi

  - <<: *integration-stage
    env: TEST_NAME=reload

  - stage: deploy
    script: skip
    before_script: skip
    after_script: skip
    before_deploy:
      - pip install setuptools wheel twine
    deploy:
      provider: pypi
      user: rycus86
      password:
        secure: Vq9IqUARSNkwbS1FbfDKI/dItA/BUAz8Oqig5PphkKobSVELYlpQpZcBmvMPB7BOA8cWWGKpaBrFFFnzAuDCXerDNGYbZyLWNzkYat6ey/xL1uo21mRMiohN1YmL22q5tCdNpGkXzxAIsevYbo01qq/J967yE4GGNXjH1z2NvsNmWulChNYs7xY22HVhkWrz1zuc3kktzn9dRbAjkRpmZY7pm5AsVR+NcqWn1eGQ+mEIwAru0DTB+9Wu3sKUGEPqTBuRe7qfvOxE1WXXqPyjUkhDM41wElTc4HjjHnb12tQKNKPhLSUKUiNFun4MG5IPXE6zLyY+loqFQF2CNNHWlLiOX4UmlCMO7+dCjRvebGYY6yyz2AiHdd+U0JCgPg0dSamaBDiyqvADyhiRBtxRLqJy2sUrNA+xzl7jdEaemyrNoORwKOoe5dHU7eqwdKaQSiD62q6LViR1unMiqoXfx+zgjcL3kV9Y6ZQaX6tnViB6AE3ZM142ZPjPuJi382OyWXKsA2RXGgr3Z6KeQgQO10nzqM6q9ud4XH9r/Ufo1HbkFQrueF2Dq5fmhSOllnAHTo9grZ3kRpmH5go2k6wAywEBsiZKeEi80a45a6O8SjSNcYO1Dq8/v0FkrLug5xRqFRYjU+hXIWlLjvVg9vOFzB1njNy92OIpFCWBu8WSm2A=
      skip_cleanup: true
      on:
        tags: true

  - stage: verify
    before_script: skip
    after_script: skip
    script:
      - pip install prometheus-flask-exporter