forked from AstroHuntsman/huntsman-pocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
58 lines (57 loc) · 1.77 KB
/
.travis.yml
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
dist: xenial
sudo: required
language: python
python:
- "3.7"
cache:
pip: true
env:
- PANDIR=/var/huntsman POCS=${PANDIR}/POCS PANUSER=$USER HUNTSMAN_POCS=${PANDIR}/huntsman-pocs
before_install:
# Set up directories.
- sudo mkdir $PANDIR && sudo chmod 777 $PANDIR
- mkdir -p $PANDIR/logs
- ln -s $TRAVIS_BUILD_DIR $PANDIR/huntsman-pocs
# Install testing dependencies.
- pip install -U pip
- pip install setuptools --upgrade
- pip install coveralls
- cd $PANDIR
# Install POCS
- git clone https://github.com/panoptes/POCS.git
- cd POCS
- pip install -r requirements.txt
- python setup.py install
# Create SSH key for Pyro nameservers
- ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -N ''
- touch ~/.ssh/authorized_keys
- cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
- ssh-keyscan -H localhost >> ~/.ssh/known_hosts
addons:
apt:
packages:
- sshfs
install:
- cd $TRAVIS_BUILD_DIR
- pip install -r requirements.txt
# Dummy command to make astropy config file appear.
- python -c "import astroplan"
# Add custom IERS urls to astropy config.
- |
echo "\
[utils.iers.iers]
iers_auto_url = https://storage.googleapis.com/panoptes-resources/iers/ser7.dat
iers_auto_url_mirror = https://storage.googleapis.com/panoptes-resources/iers/ser7.dat
" >> $HOME/.astropy/config/astropy.cfg
# Download just the IERS index.
- python $POCS/pocs/utils/data.py --no-narrow-field --no-wide-field
- python setup.py install
before_script:
- echo -e "Host 127.0.0.1\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
script:
- export PYTHONPATH="$PYTHONPATH:$POCS/scripts/coverage"
- export COVERAGE_PROCESS_START=.coveragerc
- coverage run $(which pytest) -vrst
- coverage combine
after_success:
- bash <(curl -s https://codecov.io/bash)