Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

firegento/MageCI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magento Continuous Integration Tools

A set of tools to help set up a proper environment for testing Magento.

Installation

Installation via Composer

Installation via Composer in your project is very easy.

In your application or dependent library root directory, create a composer.json file. In case you are not familiar with Composer, see composer.json Schema.

Please add the following code to your composer.json file.

{
    "require": {
        "firegento/mage-ci": "dev-master"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "http://packages.firegento.com"
        }
    ]
}

Note: You can add the dependency to the require-dev part of the composer.json as well.

Installation via Bash

The installation via bash is very easy as well. Just paste either

bash < <(wget -O - https://raw.githubusercontent.com/firegento/MageCI/master/installer)

or

bash < <(curl -s https://raw.githubusercontent.com/firegento/MageCI/master/installer)

in your shell and hit enter.

Note: The installer will then download the MageCI script and place it in your current working directory where you run the command.

Usage

Running a batch of PHPUnit tests

$ 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.

Installing a particular Magento version

$ 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

Installing a Magento module

$ bin/mage-ci install-module <magento_directory> <module_dir_or_vcs_url>
    Installs a Magento module with modman definition

Updating installed Magento modules

$ bin/mage-ci update-modules <magento_directory>
    Updates all installed modman modules at specified Magento instnace

Uninstalling Magento version

$ bin/mage-ci uninstall <magento_directory> [<db_name>] <OPTIONS>
    Performs uninstall of Magento instance
      -u  <db_user>       DB Username
      -p  <db_pass>       DB Password

Uninstalling Magento module

$ bin/mage-ci uninstall-module <magento_directory> <module_dir_or_vcs_url>
    Performs uninstall of Magento module from instance

Mass Install of Magento versions

$ 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)

Dump databases of existing installed versions

$ 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 Clean DB Dumps

It is possible to specify base url for downloading of database dump for a particular Magento version. Most of the time clean installation of Magento takes a lot of time, so it is nice to have this clean db dump prepared for each Magento version.

We created such repository at the following url: http://mage-ci.firegento.com

You just need to specify it during installation of process:

$ bin/mage-ci install magento-1.7.0.2 1.7.0.2 mage_1.7.0.2 -r http://mage-ci.firegento.com

This command will download db dump from the following URL: http://mage-ci.firegento.com/1.7.0.2.sql.gz

The following SQL dumps are provided by FireGento:

Support

If you encounter any problems or bugs, please create an issue on GitHub.

Contribution

Any contribution to the development of MageCI is highly welcome. The best possibility to provide any code is to open a pull request on GitHub.

Developer

FireGento Team

MageCI was originally developed by EcomDev and also modified and extended by:

Licence

Open Software License v. 3.0 (OSL-3.0)

Copyright

(c) 2014 FireGento Team / 2013 EcomDev BV

About

Magento Continuous Integration Tools

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%