-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor #205 Switch to Doctrine/Migrations 3.0 (pamil, GSadee)
This PR was merged into the 1.0-dev branch. Discussion ---------- Related to Sylius/Sylius#11389. Commits ------- 82e09b5 Move existing migrations to Sylius\RefundPlugin\Migrations 2b97244 Set up Doctrine Migrations v3.0 876ca3f Upgrade to Sylius 1.8 fc797bf Allow for PHP 7.3 and 7.4 0a4ff06 [Travis] Switch to bionic dd26289 Remove unused bundles 65c3487 Fix build 52eeb2d Fix errors after static analysis 62ad4b9 [Composer] Update dependencies b946e29 [Behat] Replace selenium + chromedriver with chrome headless 502e690 Remove old migrations
- Loading branch information
Showing
42 changed files
with
359 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,111 +1,79 @@ | ||
language: php | ||
|
||
dist: trusty | ||
os: linux | ||
|
||
dist: bionic | ||
|
||
php: | ||
- 7.2 | ||
- '7.3' | ||
- '7.4' | ||
|
||
services: | ||
- mysql | ||
|
||
addons: | ||
apt: | ||
sources: | ||
- google-chrome | ||
packages: | ||
- google-chrome-stable | ||
chrome: stable | ||
|
||
cache: | ||
yarn: true | ||
directories: | ||
- ~/.composer/cache/files | ||
- $SYLIUS_CACHE_DIR | ||
|
||
env: | ||
global: | ||
- APP_ENV=test | ||
|
||
jobs: | ||
include: | ||
- &test | ||
stage: test | ||
name: "Build" | ||
|
||
sudo: false | ||
|
||
env: SYLIUS_CACHE_DIR=$HOME/.sylius-cache SYLIUS_BUILD_DIR=etc/build | ||
|
||
cache: | ||
yarn: true | ||
directories: | ||
- ~/.composer/cache/files | ||
- $SYLIUS_CACHE_DIR | ||
|
||
services: | ||
- memcached | ||
- mysql | ||
|
||
before_install: | ||
- phpenv config-rm xdebug.ini || true | ||
|
||
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
|
||
- mkdir -p tests/Application/public/media/image/ | ||
- cp migrations/* tests/Application/src/Migrations/ | ||
|
||
install: | ||
- composer update --no-interaction --prefer-dist | ||
- (cd tests/Application && yarn install) | ||
|
||
before_script: | ||
- (cd tests/Application && bin/console doctrine:database:create -vvv) | ||
- (cd tests/Application && bin/console doctrine:migrations:migrate -n -vvv -q) | ||
- (cd tests/Application && bin/console assets:install -vvv) | ||
- (cd tests/Application && bin/console cache:warmup -vvv) | ||
- (cd tests/Application && yarn build) | ||
|
||
# Configure display | ||
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1680x1050x16 | ||
- export DISPLAY=:99 | ||
|
||
# Download Symfony command | ||
- wget https://get.symfony.com/cli/installer -O - | bash | ||
|
||
# Download and configure ChromeDriver | ||
- | | ||
if [ ! -f $SYLIUS_CACHE_DIR/chromedriver ] || [ "$($SYLIUS_CACHE_DIR/chromedriver --version | grep -c 2.34)" = "0" ]; then | ||
curl http://chromedriver.storage.googleapis.com/2.34/chromedriver_linux64.zip > chromedriver.zip | ||
unzip chromedriver.zip | ||
chmod +x chromedriver | ||
mv chromedriver $SYLIUS_CACHE_DIR | ||
fi | ||
# Run ChromeDriver | ||
- $SYLIUS_CACHE_DIR/chromedriver > /dev/null 2>&1 & | ||
|
||
# Download and configure Selenium | ||
- | | ||
if [ ! -f $SYLIUS_CACHE_DIR/selenium.jar ] || [ "$(java -jar $SYLIUS_CACHE_DIR/selenium.jar --version | grep -c 3.4.0)" = "0" ]; then | ||
curl http://selenium-release.storage.googleapis.com/3.4/selenium-server-standalone-3.4.0.jar > selenium.jar | ||
mv selenium.jar $SYLIUS_CACHE_DIR | ||
fi | ||
# Run Selenium | ||
- java -Dwebdriver.chrome.driver=$SYLIUS_CACHE_DIR/chromedriver -jar $SYLIUS_CACHE_DIR/selenium.jar > /dev/null 2>&1 & | ||
|
||
# Run webserver | ||
- (cd tests/Application && /home/travis/.symfony/bin/symfony server:start --port=8080 --dir=public --allow-http --no-tls --force-php-discovery --daemon) | ||
|
||
script: | ||
- composer validate --strict | ||
- composer analyse | ||
|
||
- vendor/bin/phpunit | ||
- vendor/bin/behat --strict -vvv --no-interaction --tags="~@todo" || vendor/bin/behat --strict -vvv --no-interaction --rerun --tags="~@todo" | ||
|
||
after_failure: | ||
- vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles "${SYLIUS_BUILD_DIR}/*.log" | ||
|
||
- | ||
stage: test | ||
name: "PHPSpec (with code coverage)" | ||
|
||
sudo: false | ||
|
||
services: | ||
- memcached | ||
|
||
before_install: | ||
- phpenv config-rm xdebug.ini || true | ||
|
||
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
|
||
install: | ||
- composer update --no-interaction --prefer-dist | ||
|
||
script: | ||
- phpdbg -qrr vendor/bin/phpspec run | ||
- SYLIUS_CACHE_DIR=$HOME/.sylius-cache | ||
- SYLIUS_BUILD_DIR=etc/build | ||
|
||
before_install: | ||
- phpenv config-rm xdebug.ini | ||
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
- mkdir -p "${SYLIUS_CACHE_DIR}" | ||
|
||
install: | ||
- composer install --no-interaction --prefer-dist | ||
- (cd tests/Application && yarn install) | ||
|
||
before_script: | ||
- (cd tests/Application && bin/console doctrine:database:create -vvv) | ||
- (cd tests/Application && bin/console doctrine:migrations:migrate -n -vvv -q) | ||
- (cd tests/Application && bin/console assets:install public -vvv) | ||
- (cd tests/Application && bin/console cache:warmup -vvv) | ||
- (cd tests/Application && yarn build) | ||
|
||
# Running fixtures to be sure they're not failing | ||
- (cd tests/Application && bin/console sylius:fixtures:load -n --env test) | ||
|
||
# Download Symfony CLI | ||
- | | ||
if [ ! -f $SYLIUS_CACHE_DIR/symfony ]; then | ||
wget https://get.symfony.com/cli/installer -O - | bash | ||
mv ~/.symfony/bin/symfony $SYLIUS_CACHE_DIR | ||
fi | ||
php -v | head -n 1 | awk '{ print $2 }' > .php-version | ||
# Install certificates | ||
- $SYLIUS_CACHE_DIR/symfony server:ca:install | ||
|
||
# Run Chrome Headless | ||
- google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 & | ||
|
||
# Run webserver | ||
- (cd tests/Application && $SYLIUS_CACHE_DIR/symfony server:start --port=8080 --dir=public --daemon) | ||
|
||
script: | ||
- composer validate --strict | ||
- composer analyse | ||
|
||
- vendor/bin/phpunit tests/ | ||
- phpdbg -qrr vendor/bin/phpspec run | ||
- vendor/bin/behat --strict -vvv --no-interaction || vendor/bin/behat --strict -vvv --no-interaction --rerun | ||
|
||
after_failure: | ||
- vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles "${SYLIUS_BUILD_DIR}/*.log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.