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
branches:
  only:
  - develop
  - /^release-.*$/
  - /.*-travis$/
  - master

os: linux
dist: bionic # Ubuntu 18.04

language: python
cache: pip

python:
  - "3.6"
  - "3.7"


before_install:
  - sudo apt-get update
  - sudo apt-get -y install gdal-bin
  - sudo apt-get -y install libgdal-dev
  - sudo apt-get -y install openmpi-bin
  - sudo apt-get -y install libopenmpi-dev
  - export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/include/gdal
  - export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/include/gdal
  - pip install -U pip
  - pip install codecov

install:
  - pip install -r requirements-test.txt
  - pip install -r requirements-dev.txt
  - python setup.py install
  - export PYRATEPATH=$(pwd)
  - export PYTHONPATH=$PYRATEPATH:$PYTHONPATH
  - chmod 444 tests/test_data/small_test/tif/geo_070709-070813_unw.tif  # makes the file readonly, used in a test

# command to run tests, e.g. python setup.py test
script:
  - pip install numpy==1.16.4
  - pytest --cov-report term-missing:skip-covered --cov=pyrate tests/

after_success:
  - codecov

jobs:
  include:
    - stage: deploy
      python: 3.6
      script:
        - pip install numpy==1.16.4
        - cd docs && make html
      deploy:
        provider: pages
        skip-cleanup: true
        keep-history: true
        verbose: true
        on:
          branch: master
        github-token: $GITHUB_TOKEN
        local-dir: docs/_build/html
        project_name: PyRate
        email: insar@ga.gov.au
        name: InSAR Team

notifications:
  email:
    recipients:
      - $SHEECE_EMAIL
    on_success: never
    on_failure: always