travis: use docker to run bash & shellheck

This commit is contained in:
Christian Höltje 2018-08-14 09:41:56 -04:00
parent 6017d69dc4
commit c41154ecd9
2 changed files with 19 additions and 9 deletions

View file

@ -1,13 +1,11 @@
sudo: false
sudo: required
language: bash
addons:
apt:
sources:
- debian-sid
packages:
- shellcheck
services:
- docker
script:
- "./citest"
notifications:
email: false
pushover:

16
citest
View file

@ -2,14 +2,26 @@
set -euo pipefail
cd "$(dirname "$0")"
bash_scripts=(
yank.tmux
scripts/*.sh
)
bash -Dn "${bash_scripts[@]}"
set -x
docker run \
--rm \
--volume="${PWD}:/mnt:ro" \
--workdir="/mnt" \
bash:latest \
bash -Dn "${bash_scripts[@]}"
shellcheck \
docker run \
--rm \
--volume="${PWD}:/mnt:ro" \
--workdir="/mnt" \
koalaman/shellcheck:stable \
--shell=bash \
--external-sources \
--color=always \