forked from astropy/package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
46 lines (37 loc) · 1.55 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
language: python
os:
- linux
python: 3.8
env:
global:
# The following versions are the 'default' for tests, unless
# overridden underneath. They are defined here in order to save having
# to repeat them for all configurations.
- FOLDERNAME='packagename'
- TASK='test'
- EXTRA_CONTEXT=''
- FLAGS=''
matrix:
# Extra context is a way to override options that the user normally
# specifies during the questions phase of the cookiecutter setup. The keys
# being overridden here must exist in the cookiecutter.json
# See https://cookiecutter.readthedocs.io/en/0.9.1/advanced_usage.html#injecting-extra-context
- EXTRA_CONTEXT=''
- EXTRA_CONTEXT='use_compiled_extensions=y include_example_code=y'
- EXTRA_CONTEXT="package_name=AstropyProject" FOLDERNAME='AstropyProject'
- EXTRA_CONTEXT='_parent_project=sunpy'
- EXTRA_CONTEXT='minimum_python_version=3.6'
- TASK='render' FLAGS='--config-file rendered.yml --no-input' EXTRA_CONTEXT='use_compiled_extensions=y include_example_code=y license=Other'
install:
- pip install sphinx-astropy cookiecutter gitpython tox
script:
- cd docs ; make html ; cd ..
- cookiecutter --no-input ./ -o ../test $EXTRA_CONTEXT $FLAGS
- cd ../test/$FOLDERNAME
- git init
- if [[ $TASK == 'test' ]]; then tox -e py38-test; fi
- if [[ $TASK == 'test' ]]; then tox -e build_docs; fi
- if [[ $TASK == 'test' ]]; then tox -e codestyle; fi
after_success:
- cd ../../package-template
- bash .travis-deploy.sh