forked from ajaxorg/ace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (34 loc) · 1.26 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: node_js
node_js:
- "8"
install:
- cleanup() { find node_modules -regextype posix-extended -iregex '.*((test|example|doc|demo)s?|\.(md)|license|idea|coverage|file.txt)$' -exec rm -rf {} \; || echo $?; };
install() { npm i && npm i eslint codecov istanbul typescript && cp package.json node_modules/package.json; cleanup; };
cmp --silent package.json node_modules/package.json || install;
script:
- changes=$(git diff --name-only origin/HEAD --no-renames --diff-filter=ACMR);
if [ "$changes" == "" ]; then
echo "checking all files";
node node_modules/eslint/bin/eslint "lib/ace/**/*.js";
else
changes=$(echo "$changes" | grep -P '.js$');
echo "checking $changes";
if [ "$changes" != "" ]; then
node node_modules/eslint/bin/eslint $changes;
fi
fi
- node_modules/.bin/istanbul cover lib/ace/test/all.js
- node_modules/.bin/codecov
- node_modules/.bin/tsc --noImplicitAny --strict --noUnusedLocals --noImplicitReturns --noUnusedParameters --noImplicitThis ace.d.ts
matrix:
fast_finish: false
cache:
directories:
- node_modules
sudo: false
git:
depth: 1
submodules: false
branches:
only:
- master