Skip to content
Snippets Groups Projects
Commit d1398a21 authored by Maddy Chellathurai's avatar Maddy Chellathurai
Browse files

MAGETWO-38216: Reduce Execution Time of Integration Tests on Travis CI

- CR comments
parent b95fe748
Branches
No related merge requests found
...@@ -4,8 +4,8 @@ php: ...@@ -4,8 +4,8 @@ php:
- 5.6 - 5.6
env: env:
- TEST_SUITE=unit - TEST_SUITE=unit
- TEST_SUITE=integrationPart1 - TEST_SUITE=integration_part_1
- TEST_SUITE=integrationPart2 - TEST_SUITE=integration_part_2
- TEST_SUITE=integration_integrity - TEST_SUITE=integration_integrity
- TEST_SUITE=static_phpcs - TEST_SUITE=static_phpcs
- TEST_SUITE=static_annotation - TEST_SUITE=static_annotation
...@@ -33,7 +33,7 @@ before_script: ...@@ -33,7 +33,7 @@ before_script:
- echo '' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini - echo '' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
# Install MySQL 5.6, create DB for integration tests # Install MySQL 5.6, create DB for integration tests
- > - >
sh -c "if [ '$TEST_SUITE' = 'integrationPart1' ] || [ '$TEST_SUITE' = 'integrationPart2' ] || [ '$TEST_SUITE' = 'integration_integrity' ]; then sh -c "if [ '$TEST_SUITE' = 'integration_part_1' ] || [ '$TEST_SUITE' = 'integration_part_2' ] || [ '$TEST_SUITE' = 'integration_integrity' ]; then
sudo apt-get remove --purge mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5; sudo apt-get remove --purge 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 autoremove;
sudo apt-get autoclean; sudo apt-get autoclean;
...@@ -47,14 +47,13 @@ before_script: ...@@ -47,14 +47,13 @@ before_script:
- echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- phpenv rehash; - phpenv rehash;
- composer install --no-interaction --dev - composer install --no-interaction --dev
- chmod +x dev/tests/integration/IntegationTestsForTravis.sh
script: script:
# Unit tests # Unit tests
- sh -c "if [ '$TEST_SUITE' = 'unit' ]; then ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist; fi" - sh -c "if [ '$TEST_SUITE' = 'unit' ]; then ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist; fi"
# Integration tests # Integration tests
- sh -c "if [ '$TEST_SUITE' = 'integrationPart1' ] || [ '$TEST_SUITE' = 'integrationPart2' ]; then cd dev/tests/integration/; bash IntegationTestsForTravis.sh 2; fi" - sh -c "if [ '$TEST_SUITE' = 'integration_part_1' ] || [ '$TEST_SUITE' = 'integration_part_2' ]; then cd dev/tests/integration/; bash IntegationTestsForTravis.sh 2; fi"
- sh -c "if [ '$TEST_SUITE' = 'integrationPart1' ]; then cd dev/tests/integration/; ./../../../vendor/bin/phpunit -c phpunit.xml.travis1; fi" - sh -c "if [ '$TEST_SUITE' = 'integration_part_1' ]; then cd dev/tests/integration/; ./../../../vendor/bin/phpunit -c phpunit.xml.travis1; fi"
- sh -c "if [ '$TEST_SUITE' = 'integrationPart2' ]; then cd dev/tests/integration/; ./../../../vendor/bin/phpunit -c phpunit.xml.travis2; fi" - sh -c "if [ '$TEST_SUITE' = 'integration_part_2' ]; then cd dev/tests/integration/; ./../../../vendor/bin/phpunit -c phpunit.xml.travis2; fi"
# Integration integrity tests # Integration integrity tests
- sh -c "if [ '$TEST_SUITE' = 'integration_integrity' ]; then cd dev/tests/integration/; ./../../../vendor/bin/phpunit -c phpunit.xml.dist testsuite/Magento/Test/Integrity; fi" - sh -c "if [ '$TEST_SUITE' = 'integration_integrity' ]; then cd dev/tests/integration/; ./../../../vendor/bin/phpunit -c phpunit.xml.dist testsuite/Magento/Test/Integrity; fi"
# Static tests [Code Style] # Static tests [Code Style]
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment