Skip to content

Commit

Permalink
Merge pull request #17 from yawik/develop
Browse files Browse the repository at this point in the history
Release 0.6
  • Loading branch information
cbleek committed Mar 18, 2019
2 parents efccb3d + d5f70b5 commit ce4d3df
Show file tree
Hide file tree
Showing 59 changed files with 774 additions and 268 deletions.
2 changes: 1 addition & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
service_name: travis-ci
json_path: ./json
coverage_clover: test/build/logs/clover.xml
coverage_clover: build/logs/clover.xml
17 changes: 17 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/.travis export-ignore
/build export-ignore
/etc export-ignore
/features export-ignore
/node_modules export-ignore
/test export-ignore
/vendor export-ignore
.coveralls.yml export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
behat.yml.dist export-ignore
composer.lock export-ignore
Gruntfile.js export-ignore
package.json export-ignore
package-lock.json export-ignore
phpunit.xml.dist export-ignore
11 changes: 5 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
!*
*~
.env
vendor
node_modules
build.properties
test/coverage
test/build
/test/phpunit.xml

build
composer.lock
#
# Eclipse project files
#
Expand Down
1 change: 1 addition & 0 deletions .phpbrewrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
phpbrew use 7.0-debug
98 changes: 65 additions & 33 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,84 @@
language: php
php:
- "5.6"

addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable

cache:
directories:
- "$HOME/.composer/cache"
- "$HOME/.npm"

matrix:
fast_finish: true
allow_failures:
- php: 7.2
env: COVERAGE=yes
include:
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.2
env: COVERAGE=yes

services:
- mongodb

env:
- PECLMONGO=mongo-1.6.10 PECLSOLR=solr-2.4.0
global:
- PECLSOLR=solr-2.4.0

before_install:
- sudo apt-get update > /dev/null
- "mongo --eval 'db.runCommand({setParameter: 1, textSearchEnabled: true})' admin"
- pecl channel-update pecl.php.net
- if [[ $COVERAGE != yes ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi;

install:
# install php packages required for running YAWIK phpunit tests
- sudo apt-get install -y --force-yes php5-intl php5-curl php5-xsl
# install Mongo extension
- php --ri mongodb || pecl install -f mongodb
# install SOLR extension
# using solr master version in php 7.2
- 'if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.2" || ${TRAVIS_PHP_VERSION:0:3} == "7.3" ]]; then
export HASH=de1d724299780d927cb9ed14268449ac8a28204b;
curl --location https://github.com/php/pecl-search_engine-solr/archive/${HASH}.tar.gz -o solr.tgz;
sh -c "tar xfz solr.tgz";
sh -c "cd pecl-search_engine-solr-${HASH} && phpize && ./configure && make && sudo make install";
else
sh -c "wget http://pecl.php.net/get/$PECLSOLR.tgz";
sh -c "tar xfz $PECLSOLR.tgz";
sh -c "cd $PECLSOLR && phpize && ./configure && make && sudo make install";
fi'
- phpenv config-add etc/travis/phpenv.ini

# add composer's global bin directory to the path
- export PATH="$HOME/.composer/vendor/bin:$PATH"
# TODO: change to --prefer-dist when CoreTestUtils is installable
- COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-source

before_script:
# 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"

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

- phpenv config-add .travis/phpenv.ini
- curl -sS https://getcomposer.org/installer | php
- ./composer.phar self-update
- ./composer.phar create-project --stability dev cross-solution/yawik=dev-develop ../yawik
- ./composer.phar require zendframework/zend-progressbar
# Solr directory still exists in 0.27.2
- rm -Rf `dirname $TRAVIS_BUILD_DIR`/yawik/module/Solr
- mv ../`basename $TRAVIS_BUILD_DIR` `dirname $TRAVIS_BUILD_DIR`/yawik/module
# behat preparation
- 'if [[ $COVERAGE != yes ]]; then
composer run start-selenium --timeout=0 > /dev/null 2>&1 &
sleep 5;
composer run serve --timeout=0 > /dev/null 2>&1 &
sleep 3;
fi'

script:
- cd `dirname $TRAVIS_BUILD_DIR`/yawik/module/Solr/test
- phpunit
- '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; fi;

after_script:
- cd `dirname $TRAVIS_BUILD_DIR`/yawik/module/Solr
- php `dirname $TRAVIS_BUILD_DIR`/yawik/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


# 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;
ocular.phar code-coverage:upload --format=php-clover build/logs/clover.serialized;
fi'
3 changes: 0 additions & 3 deletions .travis/phpenv.ini

This file was deleted.

10 changes: 10 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.config.init({
targetDir: './test/sandbox/public',
nodeModulesPath: __dirname + "/node_modules"
});

grunt.loadTasks('./test/sandbox/public/modules/Core');
grunt.registerTask('default',['yawik:core']);
};
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This module makes job entities searchable with Solr. In addition it enables face

Build status:

[![Build Status](https://api.travis-ci.org/yawik/Solr.svg)](https://travis-ci.org/yawik/Solr)
[![Build Status](https://travis-ci.org/yawik/Solr.svg?branch=master)](https://travis-ci.org/yawik/Solr)
[![Coverage Status](https://coveralls.io/repos/github/yawik/Solr/badge.svg?branch=develop)](https://coveralls.io/github/yawik/Solr?branch=develop)

Requirements
Expand All @@ -17,13 +17,7 @@ Requirements

Installation
------------

```
cd YAWIK/module
git clone https://github.com/yawik/Solr.git
```

Or by using composer
Using composer

```
composer install yawik/solr
Expand Down
45 changes: 45 additions & 0 deletions behat.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This file is part of the YAWIK Project
# (c) 2013 - 2016 Cross Solution (http://cross-solution.de)

default:
formatters:
progress:
verbose: true
paths: false
extensions:
Lakion\Behat\MinkDebugExtension:
directory: "%paths.base%/build/behat"
clean_start: true
screenshot: true

Novaway\CommonContexts\Extension: ~

Behat\MinkExtension:
# change this base url value to match
# your local development server url:
base_url: "http://localhost:8000"
javascript_session: chrome
sessions:
chrome:
selenium2:
browser: chrome
capabilities:
browserName: chrome
browser: chrome
version: ""
chrome:
switches:
- "--headless"
- "--disable-gpu"
- "--window-size=2000,2000"
- "--lang=en"
- "--no-sandbox"
show_auto: false

suites:
user:
contexts:
- Behat\MinkExtension\Context\MinkContext
- Yawik\Behat\CoreContext
- Yawik\Behat\UserContext
- Yawik\Behat\SummaryFormContext
66 changes: 63 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,74 @@
{
"name": "Carsten Bleek",
"email": "bleek@cross-solution.de"
},
{
"name": "Mathias Gelhausen",
"email": "gelhausen@cross-solution.de"
},
{
"name": "Anthonius Munthi",
"email": "me@itstoni.com"
}
],
"keywords": [
"yawik"
"yawik", "solr", "zf"
],
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"ext-solr": ">=2.4",
"ext-solr": ">=2.4",
"zendframework/zend-progressbar": "^2.5",
"composer/installers": "*"
"yawik/core": ">=0.32@dev",
"yawik/cv": "^0.32@dev",
"yawik/auth": "^0.32@dev",
"yawik/jobs": "^0.32@dev",
"yawik/applications": "^0.32@dev",
"yawik/settings": "^0.32@dev",
"yawik/organizations": "^0.32@dev",
"yawik/geo": "^0.32@dev",
"yawik/composer-plugin": "^0.32@dev"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"yawik/behat": ">=0.32@dev"
},
"autoload": {
"psr-4": {
"Solr\\": "src/"
}
},
"autoload-dev": {
"psr-0": {
"": "test/"
}
},
"config": {
"platform": {
"ext-mongo": "1.6.16"
},
"process-timeout": 0
},
"scripts": {
"auto-scripts": [
"npm install"
],
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
],
"serve": "php -S localhost:8000 -t test/sandbox/public",
"start-selenium": "./vendor/bin/selenium-server-standalone -p 4444 -Dwebdriver.chrome.driver=./vendor/bin/chromedriver",
"test": "phpunit"
},
"extra": {
"branch-alias": {
"dev-develop": "0.32-dev"
},
"zf": {
"module": "Solr"
}
}
}
47 changes: 47 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: "3"
services:
nginx:
image: nginx:alpine
container_name: yawik.solr.nginx
volumes:
- ./etc/docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./:/var/www/yawik
ports:
- "80:80"
links:
- php
- mongo
environment:
- UMASK=0
php:
container_name: yawik.solr.php
build:
context: ./etc/docker/php
args:
TIMEZONE: ${TIMEZONE}
volumes:
- ./etc/docker/php/php-ini-overrides.ini:/usr/local/etc/php/conf.d/99-overrides.ini
- ./:/var/www/yawik
- ./test/sandbox/var/docker/logs:/var/www/yawik/test/sandbox/var/log
- ./test/sandbox/var/docker/cache:/var/www/yawik/test/sandbox/var/cache

solr:
container_name: yawik.solr
build:
context: ./etc/docker/solr
ports:
- "8983:8983"
volumes:
- ./contrib/conf:/opt/solr/server/solr/YawikJobs/conf

mongo:
image: mongo:3.4.10
container_name: yawik.mongo
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
volumes:
- ./etc/docker/mongodb/data:/data/db
ports:
- "27017:27017"
command: mongod --smallfiles --logpath=/dev/null # --quiet
1 change: 1 addition & 0 deletions etc/docker/mongodb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data
Empty file added etc/docker/nginx/cache/.gitkeep
Empty file.
Empty file added etc/docker/nginx/log/.gitkeep
Empty file.
Loading

0 comments on commit ce4d3df

Please sign in to comment.