@@ -23,8 +23,16 @@ matrix:
23
23
before_install :
24
24
- sudo apt-get update -qq
25
25
- sudo apt-get install -y -qq postfix
26
- - sh -c "if [ -x $HOME/.cache/bin/composer ]; then $HOME/.cache/bin/composer self-update; echo ''; else mkdir -p $HOME/.cache/bin; curl --connect-timeout 30 -sS 'https://getcomposer.org/installer' | php -- --install-dir $HOME/.cache/bin/ --filename composer; fi"
27
- - $HOME/.cache/bin/composer --version
26
+ - sh -c 'if [ "$CASHER_DIR" ]; then
27
+ if [ -x $HOME/.cache/bin/composer ]; then
28
+ $HOME/.cache/bin/composer self-update; echo '';
29
+ else
30
+ mkdir -p $HOME/.cache/bin;
31
+ curl --connect-timeout 30 -sS https://getcomposer.org/installer \
32
+ | php -- --install-dir $HOME/.cache/bin/ --filename composer;
33
+ fi
34
+ fi'
35
+ - export PATH="$HOME/.cache/bin:$PATH"
28
36
before_script :
29
37
# Mock mail
30
38
- sudo service postfix stop
@@ -53,7 +61,7 @@ before_script:
53
61
# Change memory_limit for travis
54
62
- echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
55
63
- phpenv rehash;
56
- - $HOME/.cache/bin/ composer install --no-interaction --prefer-dist
64
+ - composer install --no-interaction --prefer-dist
57
65
script :
58
66
# Unit tests
59
67
- sh -c "if [ '$TEST_SUITE' = 'unit' ]; then ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist; fi"
@@ -66,4 +74,4 @@ script:
66
74
# Static tests [Code Style]
67
75
- sh -c "if [ '$TEST_SUITE' = 'static_phpcs' ]; then cd dev/tests/static; ./../../../vendor/bin/phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testCodeStyle'; fi"
68
76
# Static tests [Code Style]
69
- - sh -c "if [ '$TEST_SUITE' = 'static_annotation' ]; then cd dev/tests/static; ./../../../vendor/bin/phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testAnnotationStandard'; fi"
77
+ - sh -c "if [ '$TEST_SUITE' = 'static_annotation' ]; then cd dev/tests/static; ./../../../vendor/bin/phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testAnnotationStandard'; fi"
0 commit comments