From 407219117071c0b00c0cc8bb7a7719920ce09e54 Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Tue, 7 Jan 2020 22:56:37 +0100 Subject: [PATCH] Add npm to travis build --- .docker/init.sh | 14 +++++++------- .tests/tests/ClientAPITest.php | 3 +-- .travis.yml | 4 +++- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.docker/init.sh b/.docker/init.sh index 73a9d92..fd2e10a 100644 --- a/.docker/init.sh +++ b/.docker/init.sh @@ -49,12 +49,12 @@ else mysqld_safe --datadir=/data & mysqladmin --silent --wait=30 ping mysqladmin -u root password "${DB_ROOT_PASS}" - mysql -u root -p${DB_ROOT_PASS} < /var/www/html/scripts/ulogger.sql - mysql -u root -p${DB_ROOT_PASS} -e "CREATE USER 'ulogger'@'localhost' IDENTIFIED BY '${DB_USER_PASS}'" - mysql -u root -p${DB_ROOT_PASS} -e "GRANT ALL PRIVILEGES ON ulogger.* TO 'ulogger'@'localhost'" - mysql -u root -p${DB_ROOT_PASS} -e "CREATE USER 'ulogger'@'%' IDENTIFIED BY '${DB_USER_PASS}'" - mysql -u root -p${DB_ROOT_PASS} -e "GRANT ALL PRIVILEGES ON ulogger.* TO 'ulogger'@'%'" - mysql -u root -p${DB_ROOT_PASS} -e "INSERT INTO users (login, password) VALUES ('admin', '\$2y\$10\$7OvZrKgonVZM9lkzrTbiou.CVhO3HjPk5y0W9L68fVwPs/osBRIMq')" ulogger - mysqladmin -u root -p${DB_ROOT_PASS} shutdown + mysql -u root -p"${DB_ROOT_PASS}" < /var/www/html/scripts/ulogger.sql + mysql -u root -p"${DB_ROOT_PASS}" -e "CREATE USER 'ulogger'@'localhost' IDENTIFIED BY '${DB_USER_PASS}'" + mysql -u root -p"${DB_ROOT_PASS}" -e "GRANT ALL PRIVILEGES ON ulogger.* TO 'ulogger'@'localhost'" + mysql -u root -p"${DB_ROOT_PASS}" -e "CREATE USER 'ulogger'@'%' IDENTIFIED BY '${DB_USER_PASS}'" + mysql -u root -p"${DB_ROOT_PASS}" -e "GRANT ALL PRIVILEGES ON ulogger.* TO 'ulogger'@'%'" + mysql -u root -p"${DB_ROOT_PASS}" -e "INSERT INTO users (login, password) VALUES ('admin', '\$2y\$10\$7OvZrKgonVZM9lkzrTbiou.CVhO3HjPk5y0W9L68fVwPs/osBRIMq')" ulogger + mysqladmin -u root -p"${DB_ROOT_PASS}" shutdown sed -i "s/^\$dbdsn = .*$/\$dbdsn = \"mysql:host=localhost;port=3306;dbname=ulogger;charset=utf8\";/" /var/www/html/config.php fi diff --git a/.tests/tests/ClientAPITest.php b/.tests/tests/ClientAPITest.php index 396eb57..390682f 100644 --- a/.tests/tests/ClientAPITest.php +++ b/.tests/tests/ClientAPITest.php @@ -333,8 +333,7 @@ class ClientAPITest extends UloggerAPITestCase { "bearing" => $this->testBearing, "accuracy" => $this->testAccuracy, "provider" => $this->testProvider, - "comment" => $this->testComment, - "image" => null + "comment" => $this->testComment ]; $actual = $this->getConnection()->createQueryTable( "positions", diff --git a/.travis.yml b/.travis.yml index b237bf1..d3db1f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,7 @@ before_install: ;; esac - composer install + - npm install - until netstat -atn 2>/dev/null | grep '8080.*LISTEN'; do sleep 1; done after_success: @@ -58,7 +59,8 @@ after_success: script: - - ./vendor/bin/phpunit -c .tests/phpunit.xml + - ./vendor/bin/phpunit -c .tests/phpunit.xml || docker logs ulogger + - npm test addons: coverity_scan: