-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
44 lines (40 loc) · 1.26 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
# Travis Continuos Integration
# Currently only tests notebook files
# Based on https://conda.pydata.org/docs/travis.html
# Not sure why pip install . is necessary since conf.py adds it
# to the the path. Maybe nbsphinx executes in separate environment.
sudo: false # use container based build
language: python
dist: focal
notifications:
email: false
python:
- "3.8"
before_install:
- |
MODIFIED_FILES=$(git diff --name-only "$TRAVIS_COMMIT_RANGE" 2>/dev/null)
if [ $? -eq 0 ] && ! echo "$MODIFIED_FILES" | grep -qvE '(.md)|(.rst)|(.html)|(.png)|(.ico)'
then
echo "Only doc files were updated, not running the CI."
exit
fi
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
- conda update -q conda
- conda info -a
install:
- conda env create --file ci/environment.yml
- source activate climopy-dev
- conda list
- which conda
- which python
- python setup.py sdist bdist_wheel
- pip install --user ./dist/*.whl
script:
- ci/run-linter.sh
- pushd docs
- make html
- popd