blob: 7bf7da867c5fd51e006f5087edefe2578435fd5b [file] [log] [blame]
language: python
dist: xenial
os: linux
# Note: graphviz is needed for grapgs embedded in the docs
addons:
apt:
packages:
- graphviz
- libvirt-dev
jobs:
fast_finish: true
include:
- name: Unit Tests (Python 3.5)
python: 3.5
- name: Unit Tests (Python 3.6)
python: 3.6
- name: Unit Tests, Installation Checks (Python 3.7)
python: 3.7
before_script: TOX_ENV=py3.7,py3.7-dist,py3.7-dist-wheel
- name: Unit Tests (Python 3.8 on Windows)
os: windows
python: 3.8
language: shell
before_install:
- choco install python --version 3.8.1
- export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
- python -m pip install --user --upgrade "pip==20.0.1"
before_script: TOX_ENV=py3.8-windows
env: PATH=/c/Python38:/c/Python38/Scripts:$PATH
- name: Unit Tests (Python 3.8)
python: 3.8
- name: Unit Tests (PyPy 3.5)
python: pypy3.5
- name: License and File name Checks
env: ENV=checks
python: 3.7
before_script: TOX_ENV=checks
- name: Lint (flake8)
env: ENV=lint
python: 3.7
before_script: TOX_ENV=lint
- name: Lint (pylint)
env: ENV=pylint
python: 3.7
before_script: TOX_ENV=pylint
- name: MyPy
env: ENV=mypy
python: 3.7
before_script: TOX_ENV=mypy
- name: Code Coverage (Unit tests)
env: ENV=coverage
python: 3.7
before_script: TOX_ENV=coverage-travis
if: type != cron
- name: Docker Test Run
python: 3.6
services:
- docker
install:
script: ./contrib/run_tests.sh
if: type != cron
- name: Documentation
env:
- ENV=docs
- secure: "d4F2RE2iWFh6yqE5MUxnakDihBMsY/hMsaMWllVAYU/fvCMKhaW97d51EiS55kur/eNVX2jpEqkVkSu5VeNSxC3w9sZTG+dHVb8A43o9QaSCPngvHTZ4X9fx8lB96G7uju6pmm5ovKt85hxZW2uQNYo3ugwCUl94lVDYqo+KJUM="
python: 3.7
before_script: TOX_ENV=docs-travis
# Note: graphviz is needed for grapgs embedded in the docs
addons:
apt:
packages:
- graphviz
- gcc
- libvirt-dev
# Trigger ReadTheDocs build on docs builder
after_success:
- pip3 install requests
- python3 ./contrib/trigger_rtd_build.py
if: type != cron
# Task which scrapes pricing data for various providers and publishes
# pricing.json data with latest pricing information in public read only S3
# bucket.
# It runs daily using Travis cron job mechanism.
- name: Scrape and publish pricing data
env:
# GCE_API_KEY (apache/libcloud - prod)
- secure: "IYp6pX5FcTaIg5OEsMV4dMn+hVXbDJhLpMQ3W1E56/EOPTYPsj2IxEOLJBTUXQ+gl4xaTFUbd0uMrWrBnpA/Se+Rlc2J5gkpvt4Kv/1KGJfXHEx7zsiqJXZZ0/+oZfg5BWy1e3DDS0jf0stHL1h/+Zs/Icl22LpdC8lOdA0tBIU="
# AWS CREDENTIALS
- PRICING_DATA_BUCKET_NAME="libcloud-pricing-data"
- AWS_REGION="us-east-1"
# AWS_ACCESS_KEY_ID (apache/libcloud - prod)
- secure: "B1mqZHLG/QjU6jTI7Ai9OHi/coLCWjEQTVgTSN6SZn3a0ryaWBJD6/VNHblTBW/gwfip0dcN9cutSiZcByqTakPk5mu+ncQDIMVDzH4uB3G94wEnYBO5UWOSdcAKG0WUuiF+MgwbTxh6oTok1aN3ySlxlWgt5ZRhr2GDfjk9IJY="
# AWS_ACCESS_KEY_SECRET (apache/libcloud - prod)
- secure: "nhmQ4i8D2M+fn7FYfHI1Yj22SkLe35tjSWqoEjh1PvaDzuL+DDNUTbJMG6VgSDeztN55FwMH6dZodbEoA8qyojmGGkt6aonMTFWiOTJqRWOOWVc+87bTVeMyM98WsNelXBJsMvvU6VSOuzR8wrYlIoisrbaSKU7zekJDWwc8ffY="
python: 3.7
script:
- tox -escrape-and-publish-provider-prices
if: type = cron
install:
# NOTE: This is a workaround since we need to use install --user on Windows
- if [ "${TRAVIS_OS_NAME}" != "windows" ]; then python -m pip install --upgrade "pip==20.0.1"; fi
- python -m pip install --upgrade "setuptools==42.0.2"
- python -m pip install "virtualenv==16.7.6"
- python -m pip install "tox==3.14.2"
- TOX_ENV=py$TRAVIS_PYTHON_VERSION
script:
- tox -e $TOX_ENV --recreate
cache:
apt: true
directories:
- $HOME/.cache/pip # pip cache
- .tox
notifications:
# Disabled until ASF switches to new mailing list software
# when we can whitelist addresses
#email:
# - "notifications@libcloud.apache.org"
irc:
- "chat.freenode.net#libcloud"