Travis config update, remove branch aliases

This commit is contained in:
Serge Latyntcev 2019-11-05 14:25:36 +13:00
parent 544571007b
commit 31f6d921a1
3 changed files with 33 additions and 27 deletions

View File

@ -1,30 +1,41 @@
language: php
dist: trusty
dist: xenial
services:
- mysql
- postgresql
- xvfb
addons:
firefox: "31.0"
apt:
packages:
- tidy
- chromium-chromedriver
- chromium-browser
env:
global:
- COMPOSER_ROOT_VERSION=4.1.x-dev
- COMPOSER_ROOT_VERSION=4.x-dev
- DISPLAY=":99"
- XVFBARGS=":99 -ac -screen 0 1024x768x16"
matrix:
include:
- php: 5.6
env: DB=MYSQL RECIPE_VERSION=4.2.x-dev PHPCS_TEST=1 PHPUNIT_TEST=1
- php: 7.0
env: DB=PGSQL RECIPE_VERSION=4.2.x-dev PHPUNIT_TEST=1
- php: 7.1
env: DB=MYSQL RECIPE_VERSION=4.2.x-dev PHPUNIT_COVERAGE_TEST=1
env: DB=MYSQL PHPUNIT_TEST=1
- php: 7.1
env: DB=MYSQL RECIPE_VERSION=4.2.x-dev BEHAT_TEST=1
env: DB=PGSQL PHPUNIT_TEST=1
- php: 7.1
env: DB=MYSQL BEHAT_TEST=1
- php: 7.2
env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1
env: DB=MYSQL PHPUNIT_TEST=1
- php: 7.3
env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1 PHPCS_TEST=1
before_script:
- sudo apt-get remove -y --purge google-chrome-stable || true
# Init PHP
- phpenv rehash
- phpenv config-rm xdebug.ini
@ -32,21 +43,21 @@ before_script:
# Install composer dependencies
- composer validate
- composer require --no-update silverstripe/recipe-cms:"$RECIPE_VERSION"
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.1.x-dev; fi
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
- composer require --no-update silverstripe/recipe-cms:^4 silverstripe/recipe-testing:^1
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:^2; fi
- composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
# Start behat services
- if [[ $BEHAT_TEST ]]; then echo 'SS_BASE_URL=http://localhost:8080/' >> .env; fi
- if [[ $BEHAT_TEST ]]; then mkdir artifacts; 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 cp composer.lock artifacts/; fi
- if [[ $BEHAT_TEST ]]; then (chromedriver > artifacts/chromedriver.log 2>&1 &); fi
- if [[ $BEHAT_TEST ]]; then (vendor/bin/serve --bootstrap-file vendor/silverstripe/cms/tests/behat/serve-bootstrap.php &> artifacts/serve.log &); fi
script:
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/; fi
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/; fi
- if [[ $BEHAT_TEST ]]; then vendor/bin/behat @contentreview; fi
after_success:

View File

@ -17,10 +17,11 @@ default:
extensions:
SilverStripe\BehatExtension\MinkExtension:
default_session: selenium2
javascript_session: selenium2
selenium2:
browser: firefox
default_session: facebook_web_driver
javascript_session: facebook_web_driver
facebook_web_driver:
browser: chrome
wd_host: "http://127.0.0.1:9515" #chromedriver port
SilverStripe\BehatExtension\Extension:
screenshot_path: %paths.base%/artifacts/screenshots

View File

@ -28,18 +28,12 @@
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"squizlabs/php_codesniffer": "^3",
"silverstripe/behat-extension": "^3",
"silverstripe/serve": "^2",
"se/selenium-server-standalone": "2.41.0"
"squizlabs/php_codesniffer": "^3"
},
"suggest": {
"symbiote/silverstripe-queuedjobs": "Automatically schedules content review emails to be sent, only requiring one crontask to be created"
},
"extra": {
"branch-alias": {
"dev-master": "4.x-dev"
},
"expose": [
"client/dist"
]