forked from hackalog/easydata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (44 loc) · 1.27 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
language: python
cache:
directories:
- $HOME/.cache/pip
python:
- "3.8"
envs:
- REQUIRED_PYTHON="python3"
install:
# install miniconda
- deactivate
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- MINICONDA_PATH=/home/travis/miniconda3
- chmod +x miniconda.sh && ./miniconda.sh -b -p $MINICONDA_PATH
- chmod +x $MINICONDA_PATH
- export PATH=$MINICONDA_PATH/condabin:$PATH
- conda update --yes conda
# create cookiecutter environment
- conda create -n cookiecutter --yes python=3.8
- conda init bash
- . ~/.bashrc
- conda activate cookiecutter
- pip install cookiecutter
- pip install ruamel.yaml
script:
- pwd
# build a cookiecutter project test-env
- cookiecutter --config-file .cookiecutter-easydata-test.yml . -f --no-input
- conda deactivate
# create the environment from test-env
- cd test-env
- make create_environment
- conda activate test-env
- touch environment.yml
- make update_environment
# create test dataset
- python src/tests/make_test_datasets.py
# run tests on the src module
- cd src
- export CI_RUNNING=yes
- coverage run -m pytest --doctest-modules --doctest-continue-on-failure --verbose --pyargs src
after_success:
- conda activate test-env
- coveralls