forked from openwisp/openwisp-ipam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
42 lines (34 loc) · 1.03 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
language: python
sudo: false
cache: pip
python:
- "3.5"
branches:
only:
- master
env:
matrix:
- '' # main tests
before_install:
- pip install -e git+https://github.com/openwisp/django-ipam#egg=django-ipam
- pip install --no-cache-dir -U -r requirements-test.txt
- ./runcheckmigration
- flake8
- isort --check-only --recursive --diff .
install:
- pip install "django>=2.0,<2.1"
- python setup.py -q develop
# command to run tests, e.g. python setup.py test
script:
- coverage run --source=openwisp_ipam runtests.py
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then ./tests/manage.py makemigrations openwisp_ipam --dry-run | grep "No changes detected"; fi
- |
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
# gets commit message of last commit before pull request merge
COMMIT_MESSAGE=$(git log $TRAVIS_PULL_REQUEST_SHA --format=%B -n 1)
printf "Checking commit message:\n\n"
printf "$COMMIT_MESSAGE\n\n"
checkcommit --message "$COMMIT_MESSAGE"
fi
after_success:
- coveralls