Compare commits

...

7 commits

Author SHA1 Message Date
Mark Beamer Jr 72d322ba80
.... 2020-01-11 02:01:05 -05:00
Mark Beamer Jr 5db8e1c9ec
.... 2020-01-11 01:38:43 -05:00
Mark Beamer Jr f42cf56b0c
.... 2020-01-11 01:24:16 -05:00
Mark Beamer Jr b710d7fa7d
.... 2020-01-11 01:22:34 -05:00
Mark Beamer Jr 6c9bfbc48b
.... 2020-01-11 01:14:47 -05:00
Mark Beamer Jr 5ebe52909e
.... 2020-01-11 00:01:54 -05:00
Mark Beamer Jr e499a3c824
Update composer
Use PHP 7.2 like production
2020-01-10 23:58:48 -05:00
4 changed files with 698 additions and 470 deletions

View file

@ -1,29 +1,33 @@
os: linux
dist: xenial
language: php
dist: trusty
services:
- docker
sudo: false
cache:
directories:
- $HOME/.composer/cache/files
php:
- 7.0
- 7.1
matrix:
fast_finish: true
include:
- php: 7.0
env: PHPCS=1
env:
- DATABASE_URL=mysql://lbry:lbry@localhost:15500/chainquery
- DATABASE_TEST_URL=mysql://lbry:lbry@localhost:15500/chainquery
before_script:
- if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer:~2.1; fi
- if [[ $PHPCS != 1 ]]; then composer install; fi
- if [[ $PHPCS != 1 ]]; then composer require phpunit/phpunit:"^5.7|^6.0"; fi
- if [[ $PHPCS != 1 ]]; then composer run-script post-install-cmd --no-interaction; fi
- composer require cakephp/cakephp-codesniffer:~2.1
- composer install
- composer require phpunit/phpunit:"^5.7|^6.0"
- composer run-script post-install-cmd --no-interaction
- echo 'lbrycrdurl="rpc://lbry:lbry@lbrycrd:29245"' > chainqueryconfig.toml
- echo 'mysqldsn="lbry:lbry@tcp(mysql:3306)/chainquery"' >> chainqueryconfig.toml
- echo 'apimysqldsn="lbry:lbry@tcp(mysql:3306)/chainquery"' >> chainqueryconfig.toml
- echo 'blockchainname="lbrycrd_regtest"' >> chainqueryconfig.toml
- docker-compose up -d
- sleep 5
script:
- if [[ $PHPCS != 1 ]]; then vendor/bin/phpunit; fi
- if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests ./config ./webroot; fi
- DATABASE_TEST_URL=mysql://lbry:lbry@localhost:15500/chainquery vendor/bin/phpunit
- vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests ./config ./webroot
notifications:
email: false

1077
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -222,8 +222,8 @@ Type::build('timestamp')
* Debug Kit should not be installed on a production system
*/
if (Configure::read('debug')) {
//Plugin::load('DebugKit', ['bootstrap' => true]);
Application::addPlugin('DebugKit', ['bootstrap' => true]);
Plugin::load('DebugKit', ['bootstrap' => true]);
//Application::addPlugin('DebugKit', ['bootstrap' => true]);
}
Configure::load('lbry','lbry.default');

47
docker-compose.yml Normal file
View file

@ -0,0 +1,47 @@
version: "3.5"
services:
#############
## Lbrycrd ##
#############
lbrycrd:
image: lbry/lbrycrd:v0.17.3.2-deprecatedrpc
restart: "no"
ports:
- "15201:29246"
- "15200:29245"
expose:
- "29246"
- "29245"
## host volumes for persistent data such as wallet private keys.
volumes:
- "./persist:/data"
environment:
- RUN_MODE=regtest
###########
## MySQL ##
###########
mysql:
image: mysql/mysql-server:5.7.27
restart: "no"
ports:
- "15500:3306"
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_DATABASE=chainquery
- MYSQL_USER=lbry
- MYSQL_PASSWORD=lbry
- MYSQL_LOG_CONSOLE=true
################
## Chainquery ##
################
chainquery:
image: lbry/chainquery:v2.0.8
restart: "no"
ports:
- 6300:6300
depends_on:
- lbrycrd
- mysql
volumes:
- ./chainqueryconfig.toml:/etc/lbry/chainqueryconfig.toml
entrypoint: wait-for-it -t 0 lbrycrd:29245 -- wait-for-it -t 0 mysql:3306 -- start