forked from forkdelta/tokenbase
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
30 lines (26 loc) · 849 Bytes
/
.travis.yml
File metadata and controls
30 lines (26 loc) · 849 Bytes
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
---
language: python
python: "3.6"
install:
- pip install yamllint
- pip install -r scripts/requirements.txt
cache: pip
before_script:
- export CHANGED_TOKEN_FILES=`git diff --name-only --diff-filter=d $TRAVIS_COMMIT_RANGE -- tokens/*.yaml`
- |
if [ ! -z "$CHANGED_TOKEN_FILES" ]; then
echo "Testing changes to ${CHANGED_TOKEN_FILES}";
else
echo "No token file changes detected in ${TRAVIS_COMMIT_RANGE}. Skipping tests.";
fi
script:
- if [ ! -z "$CHANGED_TOKEN_FILES" ]; then yamllint -c .yamllint $CHANGED_TOKEN_FILES; fi
- if [ ! -z "$CHANGED_TOKEN_FILES" ]; then python scripts/test.py $CHANGED_TOKEN_FILES; fi
before_deploy:
- python scripts/build.py
deploy:
provider: pages
github-token: $GITHUB_TOKEN # Set in travis-ci.org dashboard, marked secure
skip-cleanup: true
on:
branch: master