Skip to content

Commit f9914d3

Browse files
committed
Initial commit of travis support for bamos#4.
1 parent 73dc8b1 commit f9914d3

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

.travis.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
language: python
2+
python:
3+
- "2.7"
4+
- "3.4"
5+
6+
install:
7+
- [[ $TRAVIS_PYTHON_VERSION == 2* ]] && pip install -r requirements-2.txt
8+
- [[ $TRAVIS_PYTHON_VERSION == 3* ]] && pip install -r requirements-3.txt
9+
10+
# Ensure `requirements.txt` contains all of the dependencies
11+
# for the scripts and that scripts that only operate on
12+
# command-line arguments can be executed.
13+
script:
14+
- [[ $TRAVIS_PYTHON_VERSION == 3* ]] && ./generate-readme.py
15+
- [[ $TRAVIS_PYTHON_VERSION == 2* ]] && ./python2.7/music-organizer.py --help
16+
- [[ $TRAVIS_PYTHON_VERSION == 2* ]] && ./python2.7/mt.py --help
17+
- [[ $TRAVIS_PYTHON_VERSION == 3* ]] && ./python3/github-repo-summary.py bamos/python-scripts
18+
# Requires customization: ./python3/link-checker.py
19+
- [[ $TRAVIS_PYTHON_VERSION == 3* ]] && ./python3/phonetic.py github
20+
- [[ $TRAVIS_PYTHON_VERSION == 3* ]] && ./python3/rank-writing.py README.md
21+
# OSX only: ./python3/get-osx-wallpaper.py
22+
- [[ $TRAVIS_PYTHON_VERSION == 3* ]] && ./python3/word-counter.py README.md
23+
- [[ $TRAVIS_PYTHON_VERSION == 3* ]] && ./python3/eval-expr.py '(((4+6)*10)<<2)'
24+
- [[ $TRAVIS_PYTHON_VERSION == 2* ]] && ./python3/merge-mutt-contacts.py --help

generate-readme.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@
4040
[pip]: http://pip.readthedocs.org/en/latest/
4141
[dotfiles]: https://github.com/bamos/dotfiles
4242
43+
# Dependencies
44+
These scripts are written in Python 3 except when external
45+
libraries don't support Python 3.
46+
Dependencies for Python 2 and 3 for all scripts are
47+
included in `requirements-{2,3}.txt` and can be installed
48+
using `pip` with `pip3 install -r requirements-3.txt`.
49+
4350
# Scripts
4451
{{descriptions}}
4552

requirements-2.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
multitail==1.3
2+
mutagen==1.28

requirements-3.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Jinja2==2.7.2
2+
PyPDF2==1.23
3+
toolz==0.7.1

0 commit comments

Comments
 (0)