Skip to content

Commit

Permalink
Merge pull request #491
Browse files Browse the repository at this point in the history
* pr-491: (23 commits)
  added platform config configuration for ext-mongo, ref #465
  [tests] added Novaway CommonContexts extensions, ref #465
  [tests] improved travis configuration, using mongodb driver for all PHP version, ref #465
  removed local behat configuration
  adds novaway/common-contexts to dev section of composer.json
  replaces ext-mongo with ext-mongodb
  merged develop
  test
  [CI] fixed php built in server command
  [Behat] re added --no-sandbox switch for ci testing
  [CI] added chrome addon
  [Behat] fixed tests
  [Global] fixed php >= 7.0 compatibility issues
  [Core] improved start page, disable feeds during development to improve tests speed
  [Organizations] fixed Repository/Organization::create make it compatible with RepositoryInterface
  [Auth] fixed Repository/User::create make it compatible with RepositoryInterface
  [Core] improved RepositoryInterface force ::create function to be compatible across implementor. (will cause 7.2 error)
  [Core] making getPath to be compatible for php >=7.0
  [Jobs] removed unused class from declaration
  [Behat] removed unused files, also add --no-sandbox chrome options
  ...
  • Loading branch information
TiSiE committed Oct 12, 2018
2 parents da1ae84 + a9f5420 commit af97593
Show file tree
Hide file tree
Showing 30 changed files with 3,498 additions and 585 deletions.
73 changes: 45 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
language: php

php:
- "5.6"

services:
- mongodb

Expand All @@ -12,57 +9,77 @@ cache:
- "$HOME/.npm"

env:
- PECLMONGO=mongo-1.6.10
global:
- DRIVER_VERSION="stable"
- ADAPTER_VERSION="^1.0.0"
- APPLICATION_ENV=development
- TRAVIS_NODE_VERSION="8"
- COMPOSER_FLAGS="--prefer-dist --no-interaction"

before_install:
- sudo apt-get update > /dev/null
- "mongo --eval 'db.runCommand({setParameter: 1, textSearchEnabled: true})' admin"
matrix:
fast_finish: true
include:
- php: '5.6'
env: COVERAGE=yes
- php: '5.6'
- php: '7.0'
- php: '7.1'
- php: '7.2'

install:
# install php packages required for running YAWIK phpunit tests
- sudo apt-get install -y --force-yes php5-intl php5-curl php5-xsl
# install npm to manage js assets
- sudo apt-get install -y nodejs
before_install:
- node --version
# remove xdebug when not collecting code coverage
- if [[ $COVERAGE != yes ]]; then phpenv config-rm xdebug.ini; fi;
- pecl channel-update pecl.php.net

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

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

# install Mongo extension
- sh -c "wget http://pecl.php.net/get/$PECLMONGO.tgz"
- sh -c "tar xfz $PECLMONGO.tgz"
- sh -c "cd $PECLMONGO && phpize && ./configure && make && sudo make install"

- phpenv config-add .travis/phpenv.ini
- ./install.sh -b .travis/build.properties.travis
- ./composer.phar self-update
- ./composer.phar install --dev

- pecl install -f mongodb-${DRIVER_VERSION}
- 'if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then
composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}" --prefer-dist --no-interaction --ignore-platform-reqs;
fi'
- composer install $COMPOSER_FLAGS
# setup display, behat, and selenium
- ./bin/start-selenium.sh > /dev/null 2>&1 &
- sleep 5
- APPLICATION_ENV=development php -S localhost:8000 -t public public/index.php > /dev/null 2>&1 &
- cd public
- php -S localhost:8000 index.php > /dev/null 2>&1 &
- sleep 3
- cd $TRAVIS_BUILD_DIR


script:
- ./vendor/bin/phpunit -c test
- APPLICATION_ENV=development ./vendor/bin/behat --strict --no-interaction
- 'if [[ $COVERAGE = yes ]]; then
./vendor/bin/phpunit -c test --verbose --coverage-clover=build/logs/clover.xml --coverage-php=build/logs/clover.serialized;
else
./vendor/bin/phpunit -c test --verbose;
fi'
# only run behat tests when not collecting coverage
- if [[ $COVERAGE != yes ]]; then ./vendor/bin/behat --strict --no-interaction; fi

after_script:
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.sh build/behat/*.png"
- ls -l test/build/logs
- php vendor/bin/coveralls -vvv
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover test/build/logs/clover.serialized

after_script:
# process coverage
- 'if [[ $COVERAGE = yes ]]; then
composer require satooshi/php-coveralls ^1.0;
php vendor/bin/coveralls -vvv;
wget https://scrutinizer-ci.com/ocular.phar;
php ocular.phar code-coverage:upload --format=php-clover test/build/logs/clover.serialized;
fi'
42 changes: 21 additions & 21 deletions .travis/autoload/yawik.config.global.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<?php

return array(
'doctrine' =>
array(
'connection' =>
array(
'odm_default' =>
array(
'connectionString' => '',
),
),
'configuration' =>
array(
'odm_default' =>
array(
'default_db' => 'YAWIK',
),
),
),
'core_options' =>
array(
'system_message_email' => 'test.yawik@gmail.com',
),
'doctrine' =>
array(
'connection' =>
array(
'odm_default' =>
array(
'connectionString' => 'mongodb://localhost:27017/YAWIK',
),
),
'configuration' =>
array(
'odm_default' =>
array(
'default_db' => 'YAWIK',
),
),
),
'core_options' =>
array(
'system_message_email' => 'test.yawik@gmail.com',
),
);
2 changes: 0 additions & 2 deletions .travis/phpenv.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@

extension="mongo.so"
memory_limit=512M
3 changes: 3 additions & 0 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ default:
clean_start: true
screenshot: true

Novaway\CommonContexts\Extension: ~

Behat\MinkExtension:
# change this base url value to match
# your local development server url:
Expand All @@ -32,6 +34,7 @@ default:
- "--disable-gpu"
- "--window-size=2000,2000"
- "--lang=en"
- "--no-sandbox"
show_auto: false

gherkin:
Expand Down
31 changes: 17 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "cross-solution/yawik",
"name": "yawik/test",
"type": "project",
"description": "Web based applicant tracking system for managing jobs and applications",
"authors": [
Expand Down Expand Up @@ -30,7 +30,7 @@
"homepage": "http://yawik.org/",
"require": {
"php": ">=5.6",
"ext-mongo": "*",
"ext-mongodb": "*",
"ext-intl": "*",
"zendframework/zend-mvc": "^3.0",
"zendframework/zend-mvc-console": "^1.1",
Expand All @@ -50,6 +50,10 @@
"zendframework/zendservice-recaptcha": "^3.0",
"zendframework/zend-log": "^2.9",
"zendframework/zend-serializer": "^2.8",
"zendframework/zend-progressbar": "^2.5",
"zendframework/zend-math": "^3.0",
"zendframework/zend-captcha": "^2.7",
"zendframework/zend-i18n-resources": "^2.5",
"doctrine/doctrine-mongo-odm-module": "*",
"hybridauth/hybridauth": "^2.10",
"mpdf/mpdf": "5.7.*",
Expand All @@ -58,30 +62,24 @@
"jmikola/geojson": "*",
"mikey179/vfsStream": "*",
"tracy/tracy": "^2.4",
"imagine/imagine": "^1.0",
"zendframework/zend-progressbar": "^2.5",
"zendframework/zend-math": "^3.0",
"zendframework/zend-captcha": "^2.7",
"zendframework/zend-i18n-resources": "^2.5"
"imagine/imagine": "*",
"doctrine/common": "2.7.*",
"alcaeus/mongo-php-adapter": "^1.0.0"
},
"require-dev": {
"cbleek/pecl-solr-hint": "dev-master",
"satooshi/php-coveralls": "^1.0",
"zendframework/zend-component-installer": "^0.7.0",
"zendframework/zend-test": "^3.1",
"phpunit/phpunit": "5.6.x",
"phpunit/phpunit": "^5.7",
"behat/behat": "^3.2",
"behat/mink": "^1.7",
"behat/mink-browserkit-driver": "^1.3",
"behat/mink-selenium2-driver": "^1.3",
"lakion/mink-debug-extension": "^1.2.3",
"se/selenium-server-standalone": "^2.52",
"friends-of-behat/context-service-extension": "^0.3.0",
"friends-of-behat/cross-container-extension": "^0.3.0",
"friends-of-behat/service-container-extension": "^0.3.0",
"novaway/common-contexts": "dev-master",
"enm1989/chromedriver": "^2.35",
"behat/mink-extension": "^2.3",
"enm1989/chromedriver": "2.35"
"novaway/common-contexts": "~2.0"
},
"scripts": {
"post-install-cmd": [
Expand All @@ -92,5 +90,10 @@
"psr-4": {
"Yawik\\Behat\\": "module/Behat/src"
}
},
"config": {
"platform": {
"ext-mongo": "1.6.16"
}
}
}

0 comments on commit af97593

Please sign in to comment.