-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
37 lines (35 loc) · 1.36 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
language: python
python: [2.7, 3.4, 3.5, 3.6]
install:
- pip install tox-travis
- mkdir -p "$HOME/bin"
script:
- tox -e devruntime
- tox
- tox -e docs
# First invocation of setup.py script may print extra log messages as well as
# a version number. The below invocation ensures that its following (second)
# invocation (for comparing to $TRAVIS_TAG) does not print any extra log
# messages other than a version number.
- python setup.py --version
- '[[ "$TRAVIS_TAG" = "" ]] || [[ "$TRAVIS_TAG" = "$(python setup.py --version)" ]]'
# Ensure changelog was written:
- |
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
curl -L http://github.com/micha/jsawk/raw/master/jsawk > /tmp/jsawk
chmod +x /tmp/jsawk
PR_BASE="$(curl -vf https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST.json \
| jq --raw-output '.base.sha')"
CHANGE_RANGE="${PR_BASE}..${TRAVIS_PULL_REQUEST_SHA}"
elif [[ "$TRAVIS_TAG" != "" ]]; then
CHANGE_RANGE="${TRAVIS_TAG}^1..${TRAVIS_TAG}"
else
CHANGE_RANGE="${TRAVIS_COMMIT_RANGE}"
fi
if git show --format=%B --quiet "$CHANGE_RANGE" \
| grep '\[changelog skip\]' > /dev/null; then
echo "Skip changelog checker..."
else
git diff --name-only "$CHANGE_RANGE" | grep CHANGES.rst
fi
- '[[ "$TRAVIS_TAG" = "" ]] || ! grep -i "to be released" CHANGES.rst'