-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
48 lines (45 loc) · 2.11 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
language: python
python:
- '3.6'
install: pip install -r requirements.txt
script:
- pip install -q -U setuptools
- pip install -q -U planemo
- pip install -q -U flake8
- pip install -q -U xmldiff
- pip install -q -r requirements.txt
- python setup.py install
- flake8 argparse2tool --ignore=E2,E3,E4,E5,W3,W505
- PYTHONPATH=$(argparse2tool) python examples/example.py --generate_galaxy_xml > tmp.xml
- xmldiff tmp.xml examples/example.xml
- planemo lint --report_level all --fail_level error --xsd tmp.xml
# Galaxy tool generation for example with subparsers -- generating one large (invalid) tool
- echo '<root>' > tmp-sub.xml # wrap in extra level
- PYTHONPATH=$(argparse2tool) python examples/example-sub.py --generate_galaxy_xml >> tmp-sub.xml
- echo '</root>' >> tmp-sub.xml
- xmldiff tmp-sub.xml <(echo "<root>"; cat examples/example-sub.xml; echo "</root>")
# Galaxy tool generation for example with subparsers -- generating separate tools
- PYTHONPATH=$(argparse2tool) python examples/example-sub.py --generate_galaxy_xml --command foo > tmp-sub-foo.xml
- PYTHONPATH=$(argparse2tool) python examples/example-sub.py --generate_galaxy_xml --command bar > tmp-sub-bar.xml
- xmldiff tmp-sub-foo.xml examples/example-sub-foo.xml
- planemo lint --report_level all --fail_level error --xsd tmp-sub-foo.xml
- xmldiff tmp-sub-bar.xml examples/example-sub-bar.xml
- planemo lint --report_level all --fail_level error --xsd tmp-sub-bar.xml
- PYTHONPATH=$(argparse2tool) python examples/example.py --generate_cwl_tool > tmp.cwl
- PYTHONPATH=$(argparse2tool) python examples/example-sub.py --generate_cwl_tool > tmp-sub.cwl
- sed -i 's/argparse2tool .*/argparse2tool/g' tmp.cwl tmp-sub.cwl
- diff tmp.cwl examples/example.cwl
- diff tmp-sub.cwl examples/example-sub.cwl
- PYTHONPATH=$(argparse2tool) python examples/example-click.py --generate_cwl_tool > tmp-click.cwl
- diff tmp-click.cwl examples/example-click.cwl
before_deploy:
- sed -i "s/__version__.*/__version__= '${TRAVIS_TAG}'/g" argparse2tool/__init__.py
deploy:
deploy:
provider: pypi
username: __token__
on:
tags: true
distributions: sdist bdist_wheel
edge: true
skip_existing: true