summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: e57481ddf652adc573852438d12f6f1bc7383a1c (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
language: python

notifications:
  irc:
    channels:
      - "irc.oftc.net#tor-ci"
    template:
      - "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message}"
      - "Build details : %{build_url}"
    on_success: always
    on_failure: always
  email:
    recipients:
      - phw@torproject.org
    on_success: never
    on_failure: change

python:
  - "3.7"

addons:
  hosts:
    - bridges.torproject.org

env:
  global:
    # Fixes Travis-CI issue #1748, which was causing non-deterministic CI test failures,
    # particularly in the lib/bridgedb/test/test_https.py integration tests which use
    # the Python mechanize module to test the HTTPS server.
    # See https://github.com/travis-ci/travis-ci/issues/1748
    #     https://travis-ci.org/isislovecruft/bridgedb/jobs/50169439#L1763
    #     https://stackoverflow.com/questions/2192323/what-is-the-python-egg-cache-python-egg-cache
    #     https://github.com/pypa/virtualenv/issues/459
    - PYTHON_EGG_CACHE="${HOME}/.python-eggs-$(echo $RANDOM$PPID$RANDOM | sha256sum | cut -d ' ' -f 1)"

before_install:
  - sudo apt-get update
  - mkdir $PYTHON_EGG_CACHE
  - chmod -R og-w $PYTHON_EGG_CACHE

install:
  - ./scripts/install-dependencies
  - make install

# Start a BridgeDB instance before running the tests:
before_script:
  - ./scripts/setup-tests
  - bridgedb -r run &

script:
  - make coverage-test

after_success:
  - coveralls --rcfile=".coveragerc"