pacifica/pacifica-python-downloader

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: python
python: 3.6
dist: bionic
stages:
  - lint
  - test
  - test-docs
  - deploy
before_script:
  - pip install ansible
  - ansible-galaxy install pacifica.ansible_pacifica pacifica.ansible_travis
  - ansible-playbook ~/.ansible/roles/pacifica.ansible_travis/molecule/common/playbook.yml -i ~/.ansible/roles/pacifica.ansible_travis/molecule/common/inventory.yml -e "ansible_python_interpreter=/home/travis/virtualenv/python${TRAVIS_PYTHON_VERSION}/bin/python travis_virtualenv=python${TRAVIS_PYTHON_VERSION} github_repository=cli"
  - |
    curl -X PUT -H 'Last-Modified: Sun, 06 Nov 1994 08:49:37 GMT' --upload-file README.md http://127.0.0.1:8080/103
    curl -X PUT -H 'Last-Modified: Sun, 06 Nov 1994 08:49:37 GMT' --upload-file README.md http://127.0.0.1:8080/104
    readme_size=$(stat -c '%s' README.md)
    readme_sha1=$(sha1sum README.md | awk '{ print $1 }')
    echo '{ "hashsum": "'$readme_sha1'", "hashtype": "sha1", "size": '$readme_size'}' > /tmp/file-104-update.json
    curl -X POST -H 'content-type: application/json' -T /tmp/file-104-update.json 'http://localhost:8121/files?_id=103'
    curl -X POST -H 'content-type: application/json' -T /tmp/file-104-update.json 'http://localhost:8121/files?_id=104'
  - python test_files/archiveinterfacepreload.py
script:
  - cd tests
  - coverage run --include '*/site-packages/pacifica/downloader/*' -m pytest -xsv
  - coverage report -m --fail-under 100
jobs:
  include:
    - stage: lint
      before_script: skip
      script: pre-commit run -a
    - python: 3.7
      before_script: skip
      script: pre-commit run -a
    - python: 3.8
      before_script: skip
      script: pre-commit run -a
    - stage: test
    - python: 3.7
    - python: 3.8
    - stage: test-docs
      python: 3.8
      before_script: skip
      script: >
        cd docs;
        sphinx-build -T -E -b readthedocs -d _build/doctrees-readthedocs -D language=en . _build/html;
        sphinx-build -T -b readthedocssinglehtmllocalmedia -d _build/doctrees-readthedocssinglehtmllocalmedia -D language=en . _build/localmedia;
        sphinx-build -b latex -D language=en -d _build/doctrees . _build/latex;
        sphinx-build -T -b epub -d _build/doctrees-epub -D language=en . _build/epub
    - stage: deploy
      services: []
      before_script: skip
      script: skip
      python: 3.8
      deploy:
        skip_cleanup: true
        provider: pypi
        user: dmlb2000
        distributions: sdist bdist_wheel
        password:
          secure: atBJ8Qm8DUAfGBarfjOqt49Sdjcz0Cn4a6vYsT3zR5tY9KUISeZppIzvTTDoKyeUlHrc/djaIxV57CjPP24oDIktHdS8VoZZ/zJVa0CQabQrbmGi6JPhfcQuo388qnhFoJgT3rXE1ZxOc/Zjo2fIoM2w/2h4aIwiibO9EWVifRynDyUxpCjYuJ+T3shUYg4+cLfpxhy20/+s8RJkT/bZwihyfwrbBmayYl2uxWDVrZwsz1S3cW6LOjHlYh/gJQur9oW9d99ed9jmL15abJZkFCUOQx0gdVp0WLysMUON7vYYm0pSZXZ7+vn8hqejdEOTK5qr1N9pKAOEORSxQ4r35oZSk+KF88OZBnuGmbjAo93V6aDR+9rKvH5jk16ArviWp5MbdYprhvW+yPVxdh8mwHOnYAbLqRnGfbglSJqTJZ1kXTyjrezVipfH2O+8JO5zxWXHABidG8BIqA649Rw2GPWgov7Ri8dv5qfDLbvdsRkC2Yj47OFCoeNQacTnsLS0z1h+bvuREiXx953duOHLFfi1YhRxl85Ch6QqarL078wlCAVRFPPaiVrP8qFYqFifb9ex71lKEpFJwhEv/gwfr0NcAaOhXJ6IFhX74k3kOUze39BA2Y9rBul8x1KuJ7C8MRLquFceOdiY5iUvdxgS+/036du5JOhcov3fuQe/6UM=
        on:
          tags: true
install:
  - pip install -r requirements-dev.txt
  - pip install .