forked from NREL/bifacial_radiance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (58 loc) · 2.86 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
59
60
61
62
63
64
65
66
67
68
sudo: false
language: python
python:
- "2.7"
- "3.6"
# Test two environments:
# 1) dependencies with pinned versions from requirements.txt
# 2) 'pip install --upgrade --upgrade-strategy=eager .' to install upgraded
# dependencies from PyPi using version ranges defined within setup.py
env:
- REQ_ENV='-r requirements.txt .'
# - REQ_ENV='--upgrade --upgrade-strategy=eager .'
# GUI testing requires xvfb
dist: xenial
services:
- xvfb
# Radiance is required to run tests. Download and setup v5.2
before_install:
- pwd
- wget https://github.com/NREL/Radiance/releases/download/5.2/radiance-5.2.dd0f8e38a7-Linux.tar.gz -O /tmp/radiance.tar.gz
- tar -xvf /tmp/radiance.tar.gz
- export PATH=$PATH:$PWD/radiance-5.2.dd0f8e38a7-Linux/usr/local/radiance/bin
- export RAYPATH=.:$PWD/radiance-5.2.dd0f8e38a7-Linux/usr/local/radiance/lib
- export MANPATH=$MANPATH:$PWD/radiance-5.2.dd0f8e38a7-Linux/usr/local/radiance/man
# Copy gencumulativesky into RAYPATH...
- ls -l /home/travis/build/NREL/bifacial_radiance/bifacial_radiance/data
- cp /home/travis/build/NREL/bifacial_radiance/bifacial_radiance/data/gencumulativesky $PWD/radiance-5.2.dd0f8e38a7-Linux/usr/local/radiance/bin/
- ls -l $PWD/radiance-5.2.dd0f8e38a7-Linux/usr/local/radiance/bin
# Example from TravisCI: https://docs.travis-ci.com/user/installing-dependencies
#before_install:
# - wget https://github.com/n1k0/casperjs/archive/1.0.2.tar.gz -O /tmp/casper.tar.gz
# - tar -xvf /tmp/casper.tar.gz
# - export PATH=$PATH:$PWD/casperjs-1.0.2/bin/
install:
- pip install $REQ_ENV
- pip install coveralls
script:
- pytest --cov=bifacial_radiance
after_success:
- coveralls
after_script:
# debug what's going on - try to ls-l the tests folder to see where things are saved
- pwd
- ls -l /home/travis/build/NREL/bifacial_radiance/
# Deploy to pypi on the python 3.6 build with upgraded dependencies when
# a new version is tagged on github from the master branch. Example from Rdtools
deploy:
provider: pypi
user: cdeline
password:
secure: NIZJOZDH0YH0v6oXAP9OZtwimBWWqXd//3LlaUP4mBnEiJtZ/aCh1LKMTviPYJGuzt9eLroUyAlZGw1lEkGi8dK+z1MS4WFm8HiQn/Y1lAfP9GuZz5eh8rqPSW8WwEl/BnqZoEFYZ4KD7PW/4utoVLfvLVIXsb24beUklDavhr7BAhUp1wQDK25t2hAiiJu7NdWA9Rnw30aPA0dZe2uFCBZOwBNd/ePWBnVUngUbQxZF34DhUOwcOWX+9jFTwbnH8jEa6wVXV6jWNJ34ZuLUrTqiDQLiTkvFVNtlJO+4Ja7zxJPmLQjSCM4rQ5bod0PAJwoAOfOgjT2YWZRrI7Ia9FDjSDDrT8A7S56WnzRuMNBzGkQrPYEDYPtCVmdRSw8k09HKXPaO6RGy6nZzm6SXGKLISJkDnHG7YjpUsXVOuOv8JC9khCM6DdXAVwi5hTWouNz/MUwx/mW8DW1lwLEZZEsnFLoja9hSYEnfFl3TMguQKJFL7l94U8Dz78iAuCMqN6zcOn1yHrVEat2cMLD2LbsEEImFcBqwf0N3kh6VFGk4oi9FUbBMOifXrkMUlJ/tkUPYCxG5kmANtEe26a8Ak/6RM8WZ0IVb5xdf28CmgTGYHneQqORpkj5yYC6Le6YYHIhfhQt9gZcnhHyKVqOCL6GA9HNSrKk0/mLwi/VpRqU=
distributions: "sdist bdist_wheel"
on:
tags: true
branch: master
#python: 3.6
#condition: $REQ_ENV == '--upgrade --upgrade-strategy=eager .'
#skip_cleanup: true