-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
53 lines (50 loc) · 1.9 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
language: python
python:
- 3.7
cache:
directories:
- $HOME/.cache/pip
- $HOME/.ccache # https://github.com/travis-ci/travis-ci/issues/5853
before_install:
- |
set -e
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
arch="Linux"
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
arch="MacOSX"
else
echo "Unknown arch $TRAVIS_OS_NAME"
exit 1
fi
wget https://repo.continuum.io/miniconda/Miniconda3-latest-${arch}-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p ~/mc
source ~/mc/etc/profile.d/conda.sh
- |
echo "machine github.com" > $HOME/.netrc
echo "login $GITHUB_USERNAME" >> $HOME/.netrc
echo "password $GITHUB_TOKEN" >> $HOME/.netrc
chmod -v go-rw $HOME/.netrc
install:
- conda create -n testenv python=$TRAVIS_PYTHON_VERSION -y
- conda activate testenv
- conda install -c conda-forge conda-smithy -y
# Install this package and the packages listed in requirements.txt.
- pip install .
# Install extra requirements for running tests and building docs.
- pip install -r requirements-dev.txt
- conda list --show-channel-url
- conda info
# Install specific commit of regro/cf-scripts (unreleased source code)
- pip install git+https://github.com/regro/cf-scripts@057274f371da27bb4b231105671f9ff7a992f35e
- |
wget https://raw.githubusercontent.com/regro/cf-scripts/master/requirements/run
conda install -c conda-forge --file run -y
rm -fv run
script:
- coverage run -m pytest # Run the tests and check for test coverage.
- chmod +x ./nsls2forge_utils/tests/test_check_results.sh # Add permissions
- ./nsls2forge_utils/tests/test_check_results.sh # Run testing script
- coverage report -m # Generate test coverage report.
- codecov # Upload the report to codecov.
- flake8 # Enforce code style ('relaxed' line length limit is set in .flake8 config file).
- make -C docs html # Build the documentation.