-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (37 loc) · 1.12 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
language: python
python:
- '2.7'
jobs:
include:
- language: python
addons:
apt:
update: true
python:
- '2.7'
before_script:
- git clone https://github.com/betterscientificsoftware/Scripts.git ___Scripts
script:
- ___Scripts/test_bssw_pr.sh
- language: node_js
node_js:
- '8'
install:
- npm install -g markdownlint-cli
- npm install -g markdown-spellcheck
script:
- |
CHANGED_MD_FILES=""
if [ -z "${TRAVIS_COMMIT_RANGE}" ] ; then
CHANGED_MD_FILES="$(git diff --name-only ${TRAVIS_COMMIT} -- | grep "^docs/.*\.md$")"
else
COMMIT1="$(echo ${TRAVIS_COMMIT_RANGE} | cut -f 1 -d '.')"
COMMIT2="$(echo ${TRAVIS_COMMIT_RANGE} | cut -f 4 -d '.')"
CHANGED_MD_FILES="$(git diff --name-only ${COMMIT1}..${COMMIT2} -- | grep "^docs/.*\.md$")"
fi
test -z "${CHANGED_MD_FILES}" && exit 0
markdownlint ${CHANGED_MD_FILES} || exit 1
mdspell -a -n -r -x --en-us ${CHANGED_MD_FILES} || exit 1
<!---
Publish: No
---!>