forked from bats-core/bats-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (43 loc) · 1.23 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
43
44
45
46
47
48
49
50
51
52
language: bash
os:
- linux
env:
- BASHVER= SHELLCHECK=true
- BASHVER=3.2
- BASHVER=4.0
- BASHVER=4.1
- BASHVER=4.2
- BASHVER=4.3
- BASHVER=4.4
- BASHVER=5
matrix:
include:
- os: osx
env: ''
services:
- docker
before_script:
- |
if [[ "${TRAVIS_OS_NAME:-}" == 'linux' && "$SHELLCHECK" == 'true' ]]; then
sudo apt-get install shellcheck
fi
script:
- |
if [[ "${TRAVIS_OS_NAME:-}" == 'linux' && "$SHELLCHECK" == 'true' ]]; then
./shellcheck.sh
exit $?
fi
if [[ "${TRAVIS_OS_NAME:-}" == 'linux' && -n "${BASHVER}" ]]; then
docker build --build-arg bashver="${BASHVER}" --tag "bats/bats:bash-${BASHVER}" . || exit $?
docker run -it "bash:${BASHVER}" --version || exit $?
time docker run -it "bats/bats:bash-${BASHVER}" --tap /opt/bats/test || exit $?
# also test running (recursively!) in parallel
time docker run -it -e BATS_NUMBER_OF_PARALLEL_JOBS=2 "bats/bats:bash-${BASHVER}" --tap /opt/bats/test || exit $?
else
time bin/bats --formatter tap test
# allow for some parallelity without GNU parallel, e.g. on MacOS
time BATS_NO_PARALLELIZE_ACROSS_FILES=1 BATS_NUMBER_OF_PARALLEL_JOBS=2 bin/bats --tap test
fi
notifications:
email:
on_success: never