Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Pipeline Configuration

Alexander Lukyanov edited this page Apr 29, 2022 · 4 revisions

Before You Get Started

  1. Verify that you have a repository and admin access to it.
  2. Verify that you have Magento 2 composer keys

Get Started

There are several options on which pipeline script to use based on the tests you want to perform. You may combine a several pipeline configurations as a different steps.

The pipeline leverages the Magento Testing Framework to test a code. The each pipeline should be set-up with at least two variables:

  • MAGENTO_USER
  • MAGENTO_PASS

These keys can be generated at Magento Commerce Marketplace and should be added as variables at a pipeline settings.

Authentication keys set at the beginning of the each pipeline:

composer config --global http-basic.repo.magento.com $MAGENTO_USER $MAGENTO_PASS

Pipeline Types

Composer Module

A pipeline install a composer module with all dependencies and then run tests for the module. The detailed information about tests can be found at the the Magento Testing Framework page. This pipeline in most cases have following commands:

composer require --dev thesgroup/magento2-testing-framework --no-update
vendor/bin/phpcs --config-set installed_paths vendor/magento/magento-coding-standard,vendor/phpcompatibility/php-compatibility/PHPCompatibility
vendor/bin/phpunit  -c vendor/thesgroup/magento2-testing-framework/static/integrity/phpunit.xml
vendor/bin/js-tests
docker-php-ext-enable xdebug
vendor/bin/phpunit-tests

Module Installation And Compilation

A pipeline will install a module using Composer and will test deployment with the module. This would include following commands:

bin/magento setup:install 
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy

Any of this command can be added/removed at the pipeline configuration.