Skip to content

Commit ba9a7ba

Browse files
committed
Merge pull request #378 from kirbyfan64/master
Added .travis.yml
2 parents ad9a6b3 + a85beb4 commit ba9a7ba

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: python
2+
python:
3+
- "3.2"
4+
- "3.3"
5+
- "3.4"
6+
- "pypy3"
7+
8+
install: python setup.py install
9+
10+
script: bash travis.sh

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Mypy Readme
22
===========
33

4+
[![Build Status](https://travis-ci.org/JukkaL/mypy.svg)](https://travis-ci.org/JukkaL/mypy)
5+
46

57
What is mypy?
68
-------------

travis.sh

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/bin/bash
2+
3+
result=0
4+
5+
fail()
6+
{
7+
result = 1
8+
}
9+
10+
# Setup stuff
11+
12+
DRIVER=$PWD/scripts/mypy
13+
export PYTHONPATH=`pwd`/lib-typing/3.2:`pwd`
14+
15+
# Basic tests
16+
17+
echo Running tests...
18+
echo
19+
echo tests.py
20+
python "$DRIVER" tests.py || fail
21+
for t in mypy.test.testpythoneval mypy.test.testcgen; do
22+
echo $t
23+
python "$DRIVER" -m $t || fail
24+
done
25+
26+
# Stub checks
27+
28+
STUBTEST=_test_stubs.py
29+
cd stubs/3.2
30+
ls *.py | sed s/\\.py//g | sed "s/^/import /g" > $STUBTEST
31+
for m in os os.path; do
32+
echo "import $m" >> $STUBTEST
33+
done
34+
35+
echo Type checking stubs...
36+
echo
37+
python "$DRIVER" -S $STUBTEST || fail
38+
rm $STUBTEST
39+
cd ..
40+
41+
# Sample checks
42+
43+
# Only run under 3.2
44+
45+
if [ "`python -c 'from sys import version_info as vi; print(vi.major, vi.minor)'`" == "3 3" ]; then
46+
echo Type checking lib-python...
47+
echo
48+
cd lib-python/3.2
49+
for f in test/test_*.py; do
50+
mod=test.`basename "$f" .py`
51+
echo $mod
52+
python "$DRIVER" -S -m $mod || fail
53+
done
54+
else
55+
echo "Skipping lib-python type checks(Not Python 3.2!)"
56+
fi
57+
58+
exit $result

0 commit comments

Comments
 (0)