summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 84b73bd6360c274d1b4929d10482874a80355ecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
dist: xenial
language: python
sudo: false
cache:
  directories:
    - $HOME/.cache/pip
python:
  - "2.7"
  - "3.4"
  - "3.5"
  - "3.6"
  - "3.7"
  - "3.8-dev"
  - "pypy"
  - "pypy3"
matrix:
  allow_failures:
    - python: "3.8-dev"
  # Explicitly test against our oldest supported cryptography.io, in addition
  # to whatever the latest default is.
  include:
    - python: 2.7
      env: "OLDEST_CRYPTO=2.5"
    - python: 3.7
      env: "OLDEST_CRYPTO=2.5"
    - python: 2.7
      env: "USE_K5TEST=yes"
    - python: 3.7
      env: "USE_K5TEST=yes"
install:
  # Ensure modern pip/etc to avoid some issues w/ older worker environs
  - pip install pip==9.0.1 setuptools==36.6.0
  # Grab a specific version of Cryptography if desired. Doing this before other
  # installations ensures we don't have to do any downgrading/overriding.
  - |
    if [[ -n "$OLDEST_CRYPTO" ]]; then
      pip install "cryptography==${OLDEST_CRYPTO}"
    fi
  # Self-install for setup.py-driven deps
  - pip install -e .
  # Dev (doc/test running) requirements
  # TODO: use pipenv + whatever contexty-type stuff it has
  - pip install codecov # For codecov specifically
  - pip install -r dev-requirements.txt
  - |
    if [[ -n "$USE_K5TEST" ]]; then
      # we need a few commands and libraries
      # Debian/Ubuntu package: commands used by package k5test
      #   libkrb5-dev: krb5-config
      #   krb5-kdc: kdb5_util, krb5kdc
      #   krb5-admin-server: kadmin.local, kprop, kadmind
      #   krb5-user: kinit, klist
      #
      #   krb5-multidev: required to build gssapi
      sudo apt-get -y install libkrb5-dev krb5-admin-server \
                              krb5-kdc krb5-user krb5-multidev && \
      pip install k5test gssapi pyasn1
    fi
  # In case of problems uncomment the following to get the krb environment
  # - |
  #   if [[ -n "$USE_K5TEST" ]]; then
  #     python -c 'from tests.util import k5shell; k5shell()' env | sort
  #   fi
script:
  # Fast syntax check failures for more rapid feedback to submitters
  # (Travis-oriented metatask that version checks Python, installs, runs.)
  - inv travis.blacken
  # I have this in my git pre-push hook, but contributors probably don't
  - flake8
  # All (including slow) tests, w/ coverage!
  - inv coverage
  # Ensure documentation builds, both sites, maxxed nitpicking
  - inv sites
notifications:
  irc:
    channels: "irc.freenode.org#paramiko"
    template:
      - "%{repository}@%{branch}: %{message} (%{build_url})"
    on_success: change
    on_failure: change
  email: false
after_success:
  - codecov