ulogger-server/.travis.yml

71 lines
3.0 KiB
YAML
Raw Normal View History

2017-09-05 09:36:10 +02:00
language: php
sudo: required
php:
2019-02-28 11:03:41 +01:00
- 7.2
2017-09-05 09:36:10 +02:00
env:
matrix:
- DB_DSN="mysql:host=127.0.0.1;port=8081;dbname=ulogger;charset=utf8"
- DB_DSN="pgsql:host=127.0.0.1;port=8081;dbname=ulogger"
- DB_DSN="sqlite:/tmp/data/sqlite/ulogger.db"
2017-09-05 09:42:25 +02:00
global:
- DB_USER=ulogger
- DB_PASS=secret2
- ULOGGER_URL="http://127.0.0.1:8080"
2019-02-25 13:52:26 +01:00
- secure: "fajUnR8y0+EkMLHTpDpqEsNc2UWSNQchy9Vw6bP+AVEdLnU2tdc9ZTrWfHx+vQdvo6xd/eY6TJm4cWtesG8inFhZHSzPYeeWX8xDto+fPohjTBJggvkGmhO6xYidjwTL2niKsHOVPh0ja55eCzp/DYWX/jVUNWTFsFiLwOlrZrhhoZs3JNldiPOUAgroR5SvlW1TZ1MgWO0ZLXpjpRhG3w42pRM75pzGpfwnjeA6BYCO8j/NXCiuCo9YTTGR/zM5yfYuTIxviIVcRw2Y6SQrh/nzQw3bCB7y9PvtDt/eNAzJVO8GQOQeN7cgY4kU/NMMlIxwL1nUDyaZj1+KxZj3BsG/pPxJblAE28yDdFlpTeolHuFDZpOXvbD8EnUYjk+NXUDe73tYPZT/iiojMBJ4ja+SCnq8VYvATjOHiAqDmlrrEWWwBC+i2laFSVBMJROvg+Ga85vmyV6/nvSd0fRJzrGLyeyGqSBwbGk2lS8HXPcDc5Bfn6v9sP0Sks7xXvW9A6zc262GRcSZqlvmUpbp7VteJigFNv3t3vjJRNlspvpzpPqHGKDJ3UCgt2i7+ve8zqFfevDUiDBKkMEPhIQdXPtqhzHMq4GXMDpGwq9DWcR0m/ZQISfS2K1ONnpv+4ShkGaFFk7o435GcIkitMAxRvpcA4m92l0POuqAbrXPaUU="
2017-09-05 09:36:10 +02:00
services:
- docker
before_install:
2019-02-25 13:52:26 +01:00
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
- |
case "$DB_DSN" in
mysql*)
docker build -t ulogger --build-arg DB_DRIVER=mysql .
docker run -d --name ulogger -p 8080:80 -p 8081:3306 --expose 3306 ulogger
;;
pgsql*)
docker build -t ulogger --build-arg DB_DRIVER=pgsql .
docker run -d --name ulogger -p 8080:80 -p 8081:5432 --expose 5432 ulogger
;;
sqlite*)
2019-02-22 22:35:47 +01:00
sudo apt-get update -qq
sudo apt-get install sqlite3
mkdir -p /tmp/data/sqlite
2019-02-22 22:57:38 +01:00
sqlite3 -init scripts/ulogger.sqlite /tmp/data/sqlite/ulogger.db .exit
2019-02-22 22:35:47 +01:00
sudo chown -R travis:travis /tmp/data
sudo chmod -R 777 /tmp/data
docker build -t ulogger --build-arg DB_DRIVER=sqlite .
docker run -d --name ulogger -p 8080:80 -v /tmp/data:/data ulogger
;;
esac
2017-09-05 09:36:10 +02:00
- composer install
- until netstat -atn 2>/dev/null | grep '8080.*LISTEN'; do sleep 1; done
2019-01-30 22:03:58 +01:00
after_success:
- |
if [ ! -z "$TRANSIFEX_PASSWORD" ]; then
pip install --user virtualenv
virtualenv ~/env
source ~/env/bin/activate
pip install transifex-client
echo -e "[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = api\npassword = ${TRANSIFEX_PASSWORD}\n" > ~/.transifexrc
tx push -s --no-interactive
fi
2017-09-05 09:36:10 +02:00
script:
2017-09-06 22:13:27 +02:00
- ./vendor/bin/phpunit -c .tests/phpunit.xml
2019-02-25 13:52:26 +01:00
addons:
coverity_scan:
project:
name: "bfabiszewski/ulogger-server"
description: "Build submitted via Travis CI"
notification_email: scan.coverity@fabiszewski.net
build_command_prepend: ""
build_command: "--no-command --fs-capture-search ./ --fs-capture-search-exclude-regex vendor/ --fs-capture-search-exclude-regex .tests/ --fs-capture-search-exclude-regex config.php --fs-capture-search-exclude-regex .docker/"
branch_pattern: master