forked from SUNCAT-Center/catmap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (50 loc) · 2.84 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
language: python
python:
- "2.7"
- "3.6"
notifications:
email: false
slack: slac-suncat:uMRwgQgYaSJFNr48PlZ1vtuf
env:
matrix:
- WITH_SCIPY=true
- WITH_SCIPY=false
# Setup anaconda
before_install:
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/miniconda2/bin:$PATH
- conda update --yes conda
- conda create --yes -n condaenv python=$TRAVIS_PYTHON_VERSION
- conda install --yes -n condaenv pip
- source activate condaenv
# The next couple lines fix a crash with multiprocessing on Travis and are not specific to using Miniconda
# - sudo rm -rf /dev/shm
# - sudo ln -s /run/shm /dev/shm
# Install packages
install:
- if [ "x${WITH_SCIPY}" == "xtrue" ]; then conda install --yes python=$TRAVIS_PYTHON_VERSION atlas numpy scipy matplotlib nose; else conda install --yes python=$TRAVIS_PYTHON_VERSION atlas numpy matplotlib nose; fi
- pip install -r requirements.txt
- pip install coverage
- python setup.py install #install catmap
- export PYTHONPATH=$PWD/:$PYTHONPATH
# Run tests; this is a very crude way of testing things
# We should move to a more elegant strategy in the future
script:
- coverage run --include='*catmap*' -a test_dependencies.py
- pushd tutorials/1-generating_input_file && coverage run --include='*catmap*' -a generate_input.py && popd
- pushd tutorials/2-creating_microkinetic_model && coverage run --include='*catmap*' -a mkm_job.py && popd
- pushd tutorials/3-refining_microkinetic_model && coverage run --include='*catmap*' -a mkm_job.py && popd
- pushd tutorials/thermodynamic_descriptors && coverage run --include='*catmap*' -a mkm_job.py && popd
- pushd tutorials/output_variables && coverage run --include='*catmap*' -a mkm_job.py && coverage run --include='*catmap*' -a mkm_job_output_all.py && popd
- pushd tutorials/custom_gasses && coverage run --include='*catmap*' -a fit_shomate.py && popd
- pushd tutorials/electrochemistry/HER && coverage run --include='*catmap*' -a mkm_job.py && popd
- pushd tutorials/electrochemistry/ORR_scaling && coverage run --include='*catmap*' -a make_input.py && coverage run --include='*catmap*' -a mkm_job.py && popd
- pushd tutorials/electrochemistry/ORR_thermo && coverage run --include='*catmap*' -a make_input.py && coverage run --include='*catmap*' -a mkm_job.py && popd
- pushd tutorials/electrochemistry/electrons && coverage run --include='*catmap*' -a mkm_job.py && popd
- pushd tutorials/ase_database && coverage run --include='*catmap*' -a 1_tutorial.py && popd
# lets give up on parallel test execution because current Travis VM only runs on 1.5 virtual cores.
#- for job in $(jobs -p); do wait ${job} && echo "${job} passed" || echo "${job} failed"; done
- coverage combine $(find . -name '*.coverage')
- coverage report