-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtravis-ci
More file actions
executable file
·48 lines (36 loc) · 812 Bytes
/
travis-ci
File metadata and controls
executable file
·48 lines (36 loc) · 812 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash -e
export PATH="$PWD/bin:$PATH"
# shellcheck source=../commands/.settings
. commands/.settings
# git config
if [ "$TRAVIS" = true ]; then
git config --global core.autocrlf false
git config --global user.email "[email protected]"
git config --global user.name "CI script"
fi
# Run tests
folded() {
FOLD=$((FOLD+1))
echo -e "travis_fold:start:cppsm.$FOLD\033[33;1m$1\033[0m"
travis_time_start
shift
echo "$@"
"$@"
travis_time_finish
echo -e "\ntravis_fold:end:cppsm.$FOLD\r"
}
run-test() {
mkdir "$NAME"
pushd "$NAME" > /dev/null
"../$TEST"
popd
}
for TEST in .cppsm/testing/* ; do
NAME="${TEST##*/}"
folded "$NAME" run-test
done
# Test travis-ci script
mkdir travis_ci_test && cd "$_"
NAME=hello VERSION=v1 cppsm init-hello
git commit -m Initial
../travis-ci