mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 17:05:33 +02:00
Merge pull request #218 from open-sausages/pulls/4.0/its-a-travis-tee-with-behat
FIX travis OS build version so that behat will function
This commit is contained in:
commit
bb1944f64d
17
.travis.yml
17
.travis.yml
@ -2,6 +2,10 @@ language: php
|
|||||||
|
|
||||||
dist: trusty
|
dist: trusty
|
||||||
|
|
||||||
|
sudo: required
|
||||||
|
|
||||||
|
group: deprecated-2017Q4
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.composer/cache/files
|
- $HOME/.composer/cache/files
|
||||||
@ -43,22 +47,21 @@ matrix:
|
|||||||
- DB=MYSQL
|
- DB=MYSQL
|
||||||
- PDO=1
|
- PDO=1
|
||||||
# behat tests
|
# behat tests
|
||||||
- php: 5.6
|
- php: 7.0
|
||||||
env:
|
env:
|
||||||
- BEHAT_TEST="@framework"
|
- BEHAT_TEST="@framework"
|
||||||
- DB=MYSQL
|
- DB=MYSQL
|
||||||
- php: 5.6
|
- php: 7.0
|
||||||
env:
|
env:
|
||||||
- BEHAT_TEST="@cms"
|
- BEHAT_TEST="@cms"
|
||||||
- DB=MYSQL
|
- DB=MYSQL
|
||||||
- php: 5.6
|
- php: 7.0
|
||||||
env:
|
env:
|
||||||
- BEHAT_TEST="@asset-admin"
|
- BEHAT_TEST="@asset-admin"
|
||||||
- DB=MYSQL
|
- DB=MYSQL
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
# Init PHP
|
# Init PHP
|
||||||
- printf "\n" | pecl install imagick
|
|
||||||
- phpenv rehash
|
- phpenv rehash
|
||||||
- phpenv config-rm xdebug.ini || true
|
- phpenv config-rm xdebug.ini || true
|
||||||
- echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
- echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||||
@ -66,7 +69,7 @@ before_script:
|
|||||||
# Install composer dependencies
|
# Install composer dependencies
|
||||||
- composer validate
|
- composer validate
|
||||||
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.0.x-dev; fi
|
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.0.x-dev; fi
|
||||||
- if [[ $BEHAT_TEST ]]; then composer require --no-update silverstripe/behat-extension:^3 silverstripe/serve:dev-master se/selenium-server-standalone:2.41.0; fi;
|
- if [[ $BEHAT_TEST ]]; then composer require --no-update silverstripe/behat-extension:^3 silverstripe/serve:^2 se/selenium-server-standalone:2.41.0; fi;
|
||||||
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
|
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
|
||||||
|
|
||||||
# Start behat services
|
# Start behat services
|
||||||
@ -75,14 +78,14 @@ before_script:
|
|||||||
- if [[ $BEHAT_TEST ]]; then cp composer.lock artifacts/; fi
|
- if [[ $BEHAT_TEST ]]; then cp composer.lock artifacts/; fi
|
||||||
- if [[ $BEHAT_TEST ]]; then sh -e /etc/init.d/xvfb start; sleep 3; fi
|
- if [[ $BEHAT_TEST ]]; then sh -e /etc/init.d/xvfb start; sleep 3; fi
|
||||||
- if [[ $BEHAT_TEST ]]; then (vendor/bin/selenium-server-standalone > artifacts/selenium.log 2>&1 &); fi
|
- if [[ $BEHAT_TEST ]]; then (vendor/bin/selenium-server-standalone > artifacts/selenium.log 2>&1 &); fi
|
||||||
- if [[ $BEHAT_TEST ]]; then (vendor/bin/serve --bootstrap-file cms/tests/behat/serve-bootstrap.php &> artifacts/serve.log &); fi
|
- if [[ $BEHAT_TEST ]]; then (vendor/bin/serve --bootstrap-file vendor/silverstripe/cms/tests/behat/serve-bootstrap.php &> artifacts/serve.log &); fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit --testsuite $PHPUNIT_TEST; fi
|
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit --testsuite $PHPUNIT_TEST; fi
|
||||||
- if [[ $BEHAT_TEST ]]; then vendor/bin/behat $BEHAT_TEST; fi
|
- if [[ $BEHAT_TEST ]]; then vendor/bin/behat $BEHAT_TEST; fi
|
||||||
|
|
||||||
after_failure:
|
after_failure:
|
||||||
- if [[ $BEHAT_TEST ]]; then php ./framework/tests/behat/travis-upload-artifacts.php --if-env BEHAT_TEST,ARTIFACTS_BUCKET,ARTIFACTS_KEY,ARTIFACTS_SECRET --target-path $TRAVIS_REPO_SLUG/$TRAVIS_BUILD_ID/$TRAVIS_JOB_ID --artifacts-base-url https://s3.amazonaws.com/$ARTIFACTS_BUCKET/ --artifacts-path ./artifacts/; fi
|
- if [[ $BEHAT_TEST ]]; then php ./vendor/silverstripe/framework/tests/behat/travis-upload-artifacts.php --if-env BEHAT_TEST,ARTIFACTS_BUCKET,ARTIFACTS_KEY,ARTIFACTS_SECRET --target-path $TRAVIS_REPO_SLUG/$TRAVIS_BUILD_ID/$TRAVIS_JOB_ID --artifacts-base-url https://s3.amazonaws.com/$ARTIFACTS_BUCKET/ --artifacts-path ./artifacts/; fi
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
slack: silverstripeltd:Cls1xnypKBLFhv0YIRtNLzlQ
|
slack: silverstripeltd:Cls1xnypKBLFhv0YIRtNLzlQ
|
||||||
|
Loading…
Reference in New Issue
Block a user