forked from NRL-Plasma-Physics-Division/turbopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (43 loc) · 1.71 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
language: python
python:
- 3.7
install:
- sudo apt update
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- source "$HOME/miniconda/etc/profile.d/conda.sh"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- conda env create -f environment.yml
- conda activate turbopy
#- pip install codecov
- pip install -e .
#- pip install pylint-exit
- pip install anybadge
#- pip install docstr-coverage
script:
- pytest
#after_success:
# - codecov # submit coverage
# test
# - pytest --cov=turbopy tests/ | tee pytest.txt
# - score=$(cat pytest.txt | grep TOTAL | grep -o -P '[0-9]*(\.[0-9]*)?(?=%)')
# - echo "test coverage is ${score}%"
#- anybadge --label=pytest --value=$score --suffix='%' --file=pytest.svg 50=red 60=orange 80=yellow 100=green
# docs
#- cd docs
#- make html
#- rsync -rl _build/html/ /srv/shiny-server/nepc/doc/ --delete
#- cd ..
#- docstr-coverage nepc | tee docstr.txt || true
#- score=$(cat docstr.txt | tail -n 1 | grep -Eo '[+-]?[0-9]+([.][0-9]+)?')
#- echo "docstr-coverage score was ${score}%"
#- anybadge --label=doc --value=$score --suffix='%' --file=sphinx.svg 50=red 60=orange 80=yellow 100=green
# lint
#- pylint --output-format=text nepc/ | tee pylint.txt || pylint-exit $?
#- score=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' pylint.txt)
#- echo "Pylint score was $score"
#- anybadge --value=$score --file=pylint.svg pylint