Skip to content
Permalink
Browse files

Merge branch 'travis-build' of https://github.com/kilip/yawik into me…

…rge-travis-fix
  • Loading branch information
cbleek committed Oct 16, 2019
2 parents 6eb6eff + 2050b40 commit da11e8c4d2f5dab1b3c52273794c0d2042d42d52
Showing with 78 additions and 77 deletions.
  1. +1 −0 .gitignore
  2. +67 −59 .travis.yml
  3. +10 −10 composer.json
  4. +0 −8 etc/docker/php/php-ini-overrides.ini
@@ -2,6 +2,7 @@
/behat.yml
/.env.test
/package-lock.json
/composer.lock

#
# General text editors backup files
@@ -14,80 +14,88 @@ cache:
directories:
- "$HOME/.composer/cache"
- "$HOME/.npm"
.steps:
- &disable-php-memory-limit |
echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- &disable-xdebug |
phpenv config-rm xdebug.ini || echo "xdebug not available"
- &update-pecl-channel |
pecl channel-update pecl.php.net
- &setup-env-variables |
export PATH="$HOME/.composer/vendor/bin:$PATH"
export PHPCMD="php"
export PHPUNIT_OPTS=""
if [[ ${COVERAGE} = yes ]]; then export PHPCMD="phpdbg -qrr"; fi
if [[ ${COVERAGE} = yes ]]; then export PHPUNIT_OPTS="--coverage-clover=build/logs/clover.xml"; fi
- &copy-config |
mkdir -p config/autoload
mkdir -p build/behat
mkdir -p build/mails
cp ./etc/travis/autoload/*.* config/autoload
- &install-mongo-extension |
php --ri mongodb || pecl install -f mongodb
phpenv config-add etc/travis/phpenv.ini
- &install-composer-dependencies |
composer install --no-interaction
npm install
- &setup-selenium |
./bin/start-selenium > /dev/null 2>&1 &
sleep 5
composer run serve --timeout=0 > /dev/null 2>&1 &
- &test-phpunit |
$PHPCMD ./vendor/bin/phpunit $PHPUNIT_OPTS
- &test-behat |
./vendor/bin/behat --strict --no-interaction
- &upload-coverage |
composer require php-coveralls/php-coveralls --no-scripts
travis_retry vendor/bin/php-coveralls -vvv
wget https://scrutinizer-ci.com/ocular.phar
travis_retry php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
- &run-integration |
etc/travis/bin/split.sh
etc/travis/bin/integration.sh
- &upload-log-files |
cd $TRAVIS_BUILD_DIR
./vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles build/behat/*.log
./vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles log/*.log
./vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles log/tracy/*.*
IMGUR_CLIENT_ID=bec050c54e1bb52 ./bin/imgur-uploader build/behat/*.png

# hello world
matrix:
fast_finish: true
allow_failures:
- php: 7.2
- php: '7.3'
env: INTEGRATION=yes
- php: 7.2
- php: '7.3'
env: COVERAGE=yes
- php: 7.3
include:
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.2
- php: '7.1'
- php: '7.2'
- php: '7.3'
env: COVERAGE=yes
- php: 7.2
after_script: *upload-coverage
- php: '7.3'
env: INTEGRATION=yes
if: repo=cross-solution/YAWIK AND branch=~ /(master|develop)/ AND type NOT IN (pull_request)
after_script: *run-integration

before_install:
- node --version
# remove xdebug when not collecting code coverage
- if [[ $COVERAGE != yes ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi;
- pecl channel-update pecl.php.net
- *disable-php-memory-limit
- *disable-xdebug
- *update-pecl-channel
- *setup-env-variables

before_script:
# add composer's global bin directory to the path
- export PATH="$HOME/.composer/vendor/bin:$PATH"

# copy default app config
- mkdir -p config/autoload
- mkdir -p build/behat
- mkdir -p build/mails
- cp ./etc/travis/autoload/*.* config/autoload

# install Mongo extension
- php --ri mongodb || pecl install -f mongodb
- phpenv config-add etc/travis/phpenv.ini
- composer install --prefer-dist --no-interaction
install:
- *copy-config
- *install-mongo-extension
- *install-composer-dependencies

# TODO: remove this line when composer auto-scripts automatically executed
- composer run auto-scripts

# setup display, behat, and selenium
- ./bin/start-selenium > /dev/null 2>&1 &
- sleep 5
- composer run serve --timeout=0 > /dev/null 2>&1 &
before_script:
- *setup-selenium

script:
- 'if [[ $COVERAGE = yes ]]; then
./vendor/bin/phpunit --verbose --coverage-clover=build/logs/clover.xml --coverage-php=build/logs/clover.serialized;
else
./vendor/bin/phpunit --verbose;
fi'
- if [[ $COVERAGE != yes ]]; then ./vendor/bin/behat --strict --no-interaction; fi;
# run integration job
- 'if [[ $INTEGRATION = yes ]]; then
etc/travis/bin/split.sh;
etc/travis/bin/integration.sh;
fi'
- *test-phpunit
- *test-behat

after_failure:
- cd $TRAVIS_BUILD_DIR
- "./vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles \"build/behat/*.log\""
- "./vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles \"log/*.log\""
- "./vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles \"log/tracy/*.*\""
- "IMGUR_CLIENT_ID=bec050c54e1bb52 ./bin/imgur-uploader build/behat/*.png"

after_script:
# process coverage
- 'if [[ $COVERAGE = yes ]]; then
composer require php-coveralls/php-coveralls --no-scripts;
travis_retry vendor/bin/php-coveralls -vvv;
wget https://scrutinizer-ci.com/ocular.phar;
travis_retry php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml;
fi'
- *upload-log-files
@@ -93,7 +93,7 @@
"lakion/mink-debug-extension": "^1.2.3",
"mikey179/vfsstream": "^1.6",
"novaway/common-contexts": "~2.0",
"phpunit/phpunit": "^7.5.8 || ^8.1.2",
"phpunit/phpunit": "^7.5.8",
"se/selenium-server-standalone": "^2.52",
"zendframework/zend-component-installer": "^1.1 | ^2.0",
"zendframework/zend-test": "^3.1"
@@ -154,15 +154,15 @@
}
},
"replace": {
"yawik/applications": "self.version",
"yawik/auth": "self.version",
"yawik/core": "self.version",
"yawik/cv": "self.version",
"yawik/install": "self.version",
"yawik/jobs": "self.version",
"yawik/organizations": "self.version",
"yawik/pdf": "self.version",
"yawik/settings": "self.version"
"yawik/applications": "0.33",
"yawik/auth": "0.33",
"yawik/core": "0.33",
"yawik/cv": "0.33",
"yawik/install": "0.33",
"yawik/jobs": "0.33",
"yawik/organizations": "0.33",
"yawik/pdf": "0.33",
"yawik/settings": "0.33"
},
"extra": {
"branch-alias": {

This file was deleted.

0 comments on commit da11e8c

Please sign in to comment.
You can’t perform that action at this time.