-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathruntests.sh
executable file
·31 lines (24 loc) · 1009 Bytes
/
runtests.sh
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
#!/bin/bash
BIN_DOCKER=$(which docker)
if [ $? != 0 ]; then
echo "Unable to find docker"
exit 1
fi
PJ_ROOT=$(pwd)
if ! [ -d vendor ]; then
echo "Running composer install"
docker run --rm -it -v ${PJ_ROOT}:/release -u `stat . -c "%u:%g"` luiscoms/release composer install
fi
docker run --rm -it -v ${PJ_ROOT}:/release luiscoms/release chmod 444 tests/fixtures/invalid/perms/*/composer.json
# docker run --rm -it -v ${PJ_ROOT}:/release -u `stat . -c "%u:%g"` luiscoms/release phpunit --testdox -vc tests/
docker run --rm -it -v ${PJ_ROOT}:/release -u `stat . -c "%u:%g"` luiscoms/release phpunit -vc tests/
if ! [ -z $1 ];then
docker run --rm -it -v ${PJ_ROOT}:/release -u `stat . -c "%u:%g"` luiscoms/release bash -c 'cd tests; humbug'
fi
if ! [ -z $2 ];then
docker run --rm -it \
-e "COVERALLS_RUN_LOCALLY=1" \
-e "COVERALLS_REPO_TOKEN="$COVERALLS_REPO_TOKEN \
-v ${PJ_ROOT}:/release luiscoms/release \
vendor/bin/coveralls -v
fi