sudo: false # use container-based environment on Travis language: php php: - 5.6 - hhvm - '7' before_install: - cd work # go to root folder for development environment - pwd # control current path ('LOCAL_ROOT' in templates.json) - cp templates.json.travis templates.json # create configuration for Travis from template - composer self-update # update composer to prevent error Class 'Composer\Installer\PackageEvents' not found in # .../work/vendor/aydin-hassan/magento-core-composer-installer/src/CoreManager.php on line 109 - composer install # install project using PHP Composer - cat ./bin/deploy/post_install.sh # control parameters in the installation script - cat ./bin/deploy/post_install.sql # control parameters in the SQL script - sh ./bin/deploy/post_install.sh # create initial DB, run SQL script, setup permissions, ... script: - phpunit --configuration ./test/unit/phpunit.dist.xml # run project's unit tests - phpunit --configuration ./test/functional/phpunit.dist.xml # run project's functional tests
sudo: required # use Travis standard env (http://docs.travis-ci.com/user/ci-environment/) language: php php: - 5.6 # - hhvm # there is an error on DB installation: "Command option 'language': Invalid value. To see possible values, # ... run command 'bin/magento info:language:list'." before_install: # Setup MySQL 5.6 on Ubuntu 12.04 (thanks to drogus - https://gist.github.com/drogus/6718448): - mysql --version # control version before upgrade - sudo apt-get remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5 - sudo apt-get autoremove - sudo apt-get install libaio1 - wget -O mysql-5.6.14.deb http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.14-debian6.0-x86_64.deb/from/http://cdn.mysql.com/ - sudo dpkg -i mysql-5.6.14.deb - sudo cp /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server - sudo ln -s /opt/mysql/server-5.6/bin/* /usr/bin/ # some config values were changed since 5.5 - sudo sed -i'' 's/table_cache/table_open_cache/' /etc/mysql/my.cnf - sudo sed -i'' 's/log_slow_queries/slow_query_log/' /etc/mysql/my.cnf - "sudo sed -i'' 's/basedir[^=]\\+=.*$/basedir = \\/opt\\/mysql\\/server-5.6/' /etc/mysql/my.cnf" # there is an error # ... w/o double quotes: The command "sudo sed -i'' 's/basedir[^=]\+=.*$/basedir = \/opt\/mysql\/server-5.6/' /etc/mysql/my.cnf" failed and exited with 1 during . - sudo /etc/init.d/mysql.server start - mysql --version # control version after upgrade # Deploy Magento 2 application # Go to working folder, copy templates.json for travis and start composer install process - cd work # go to root folder for development environment - pwd # control current path ('LOCAL_ROOT' in templates.json) - cp templates.json.travis templates.json # create configuration for Travis from template # - composer self-update # update composer to prevent error Class 'Composer\Installer\PackageEvents' not found in # .../work/vendor/aydin-hassan/magento-core-composer-installer/src/CoreManager.php on line 109 - composer install # Run post installation script (deploy Magento2 itself) - cat ./bin/deploy/post_install.sh # control parameters in the installation script - sh ./bin/deploy/post_install.sh # create initial DB, setup permissions, ... script: - phpunit --configuration ./test/unit/phpunit.dist.xml # run project's unit tests - phpunit --configuration ./test/functional/phpunit.dist.xml # run project's functional tests # - phpunit --configuration ./htdocs/dev/tests/unit/phpunit.xml.dist # run Magento 2 unit tests
Command option 'language': Invalid value. To see possible values, run command 'bin/magento info:language:list
.PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 122133 bytes) in /home/travis/build/flancer32/sample_mage2_module/work/vendor/phpunit/phpunit/src/Util/GlobalState.php on line 110
Source: https://habr.com/ru/post/247349/
All Articles