ecomdev / mage-ci
此包已被弃用,不再维护。没有建议的替代包。
Magento 连续集成工具
1.0.10
2014-10-28 08:03 UTC
This package is auto-updated.
Last update: 2021-07-27 14:33:51 UTC
README
一套工具,用于帮助设置适当的测试环境以测试 Magento
安装
通过 composer.json 安装非常简单
在您的应用程序或依赖库的根目录中,创建一个 composer.json 文件。如果您不熟悉 Composer,请参阅 composer.json Schema。
在 require 或 require-dev 部分中添加以下依赖项
"ecomdev/mage-ci": "dev-master"
使用方法
运行一批 PHPUnit 测试
$ mage-ci phpunit <directory> <OPTIONS>
Runs unit tests for all phpunit.xml or phpunit.dist.xml files in <directory> or its subdirectories.
<OPTIONS> will be passed directly to phpunit binary.
安装特定版本的 Magento
$ bin/mage-ci install <magento_directory> <version> <db_name> <OPTIONS>
Installs a Magento version to a specified destination
-c Create databases flag
-t Create test database flag (only in combination with -c option)
-u <db_user> DB Username
-p <db_pass> DB Password
-r <sql_base_url> SQL dumps repository url for a particular Magento version (<sql_base_url>/<version>.sql.gz)
-f <sql_dump_file> SQL dump file, if you'd like to preinstall some data and specfied -c option
安装 Magento 模块
$ bin/mage-ci install-module <magento_directory> <module_dir_or_vcs_url>
Installs a Magento module with modman definition
更新已安装的 Magento 模块
$ bin/mage-ci update-modules <magento_directory>
Updates all installed modman modules at specified Magento instnace
卸载 Magento 版本
$ bin/mage-ci uninstall <magento_directory> [<db_name>] <OPTIONS>
Performs uninstall of Magento instance
-u <db_user> DB Username
-p <db_pass> DB Password
卸载 Magento 模块
$ bin/mage-ci uninstall-module <magento_directory> <module_dir_or_vcs_url>
Performs uninstall of Magento module from instance
批量安装 Magento 版本
$ bin/mage-ci install-multiple <directory> <prefix> <version1> ... <versionN> <OPTIONS>
Installs multiple version of magento at <directory> in subdirectories which name is a combined value of <prefix>-<version>
-d <download_dir> Directory where all downloads are stored
-u <db_user> DB Username
-p <db_pass> DB Password
-t Create test db as well
-r <sql_base_url> SQL dumps repository url for a particular Magento version (<sql_base_url>/<version>.sql.gz)
转储现有已安装版本的数据库
$ bin/mage-ci db-dump <directory> <prefix> <version1> ... <versionN> <OPTIONS>
Creates Magento database dump file at <directory> directory with name <file_prefix><version>.sql.gz, the dumped database is <prefix>_<version>
-u <db_user> DB Username
-p <db_pass> DB Password
-s <file_prefix> sql file prefix
Magento 清理数据库转储
可以指定特定 Magento 版本的数据库转储的下载基础 URL。大多数情况下,干净的 Magento 安装需要花费大量时间,因此为每个 Magento 版本准备一个干净的数据库转储会很方便。
我们在以下 URL 创建了这样的存储库: http://mage-ci.ecomdev.org
您只需在安装过程中指定即可
$ bin/mage-ci install magento-1.7.0.2 1.7.0.2 mage_1.7.0.2 -r http://mage-ci.ecomdev.org
此命令将从以下 URL 下载数据库转储:http://mage-ci.ecomdev.org/1.7.0.2.sql.gz