Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:SaftIng/Saft
Browse files Browse the repository at this point in the history
  • Loading branch information
k00ni committed Jan 12, 2017
2 parents 3137650 + af0d027 commit 0840cfb
Show file tree
Hide file tree
Showing 9 changed files with 452 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage_clover: gen/coverage/clover.xml
json_path: gen/coverage/coveralls-upload.json
service_name: travis-ci
56 changes: 45 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,53 @@
language: php

php:
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- hhvm
- nightly
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- nightly

sudo: false
env:
- VIRTUOSO=6.1.7
- VIRTUOSO=7.1.0
- VIRTUOSO=7.2.4.2

install:
- travis_retry composer install --no-interaction
matrix:
fast_finish: true
include:
- php: hhvm
- php: '5.4'
env: VIRTUOSO=6.1.4
- php: '5.4'
env: VIRTUOSO=6.1.6
- php: '5.4'
env: VIRTUOSO=7.2.0
allow_failures:
- env: VIRTUOSO=6.1.4
- env: VIRTUOSO=6.1.6
- php: nightly

cache:
directories:
- $HOME/.composer/cache
- virtuoso-opensource

sudo: true

services:
- mysql

before_install:
- bash ./scripts/travis/install-extensions.sh
- bash ./scripts/travis/install-services.sh
- composer require satooshi/php-coveralls:1.*
- travis_retry composer install --dev --no-interaction

before_script:
- cp test-config.yml.dist test-config.yml
- cp test-config.yml.travis test-config.yml
- sed -i 's|<[/]\?log[^>]*>||' phpunit.xml

script: vendor/bin/phpunit --coverage-clover gen/coverage/clover.xml

script: vendor/bin/phpunit
after_script: php vendor/bin/coveralls -v
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Saft

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

The Saft PHP framework provides RDF handling and support for Semantic Web technologies. It consists of the Saft.Library (_Saft.data_, _Saft.rdf_, _Saft.sparql_ and _Saft.store_), Saft.Additions (e.g. adapter for triple stores) and Saft.skeleton (to jump start your project).

Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<directory suffix=".php">./src</directory>
<exclude>
<directory suffix="Test.php">./src/Saft/*/Test</directory>
<directory suffix="Test.php">./src/Saft/Backend/*/Test</directory>
<directory suffix="Test.php">./src/Saft/Addition/*/Test</directory>
<directory>./src/Saft/Test</directory>
<file>./src/Saft/TestCase.php</file>
</exclude>
Expand Down
79 changes: 79 additions & 0 deletions scripts/travis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
- `install-services.sh` to handle the install of additional services

## SPARQL services

This file and scripts are taken form the SemanticMediaWiki repo and only selected files where copied for running tests with virtuoso.
It is taken as of commit 721a63d3a73400300f73e0a088196a6ed0fe5afd from https://github.com/SemanticMediaWiki/SemanticMediaWiki.
The unsupported services are marked with *Endabled* "No".

<table>
<tr>
<th>Endabled</th>
<th>Service</th>
<th>Connector</th>
<th>QueryEndPoint</th>
<th>UpdateEndPoint</th>
<th>DataEndpoint</th>
<th>DefaultGraph</th>
<th>Comments</th>
</tr>
<tr>
<th>No</th>
<th>Fuseki (mem)<sup>1</sup></th>
<td>Fuseki</td>
<td>http://localhost:3030/db/query</td>
<td>http://localhost:3030/db/update</td>
<td>''</td>
<td>''</td>
<td>fuseki-server --update --port=3030 --mem /db</td>
</tr>
<tr>
<th>No</th>
<th>Fuseki (memTDB)</th>
<td>Fuseki</td>
<td>http://localhost:3030/db/query</td>
<td>http://localhost:3030/db/update</td>
<td>''</td>
<td>http://example.org/myFusekiGraph</td>
<td>fuseki-server --update --port=3030 --memTDB --set tdb:unionDefaultGraph=true /db</td>
</tr>
<tr>
<th>Yes</th>
<th>Virtuoso opensource</th>
<td>Virtuoso</td>
<td>http://localhost:8890/sparql</td>
<td>http://localhost:8890/sparql</td>
<td>''</td>
<td>http://example.org/myVirtuosoGraph</td>
<td>sudo apt-get install virtuoso-opensource</td>
</tr>
<tr>
<th>No</th>
<th>4store<sup>2</sup></th>
<td>4store</td>
<td>http://localhost:8088/sparql/</td>
<td>http://localhost:8088/update/</td>
<td>''</td>
<td>http://example.org/myFourGraph</td>
<td>apt-get install 4store</td>
</tr>
<tr>
<th>No</th>
<th>Sesame</th>
<td>Custom</td>
<td>http://localhost:8080/openrdf-sesame/repositories/test-smw</td>
<td>http://localhost:8080/openrdf-sesame/repositories/test-smw/statements</td>
<td>''</td>
<td>`test-smw` is specifed as native in-memory store</td>
<td></td>
</tr>

</table>

<sup>1</sup> When running integration tests with [Jena Fuseki][fuseki] it is suggested that the `in-memory` option is used to avoid potential loss of production data during test execution.

<sup>2</sup> Currently, Travis-CI doesn't support `4Store` (1.1.4-2) as service but the following configuration has been sucessfully tested with the available test suite. ([issue #110](https://github.com/garlik/4store/issues/110) )

[fuseki]: https://jena.apache.org/
[virtuoso]: https://github.com/openlink/virtuoso-opensource
[4store]: https://github.com/garlik/4store
45 changes: 45 additions & 0 deletions scripts/travis/install-extensions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

echo $TRAVIS_PHP_VERSION

# skip hhvm
if [[ $TRAVIS_PHP_VERSION = "hhv"* ]]; then
exit 0
fi

# get build dependencies
sudo apt-get install -y unixODBC-dev

PHPVERSION=$( php -v | head -n1 | sed "s|^PHP \([0-9][0-9\.]*\).*$|\1|" | tr -d '\n' )

ls ~/.phpenv/versions/
echo "PHPVERSION: " $PHPVERSION
echo "LOADED CONFIG: " `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`

# get php sources
wget https://github.com/php/php-src/archive/php-$PHPVERSION.tar.gz
ls
tar -xzf php-$PHPVERSION.tar.gz

# build odbc extension
cd php-src-php-$PHPVERSION/ext/odbc/
phpize
# use fix from https://github.com/docker-library/php/issues/103
sed -ri 's@^ *test +"\$PHP_.*" *= *"no" *&& *PHP_.*=yes *$@#&@g' configure
./configure --with-unixODBC=shared,/usr
make
make install

# enable odbc
echo "extension=odbc.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`

# build pdo_odbc
cd ../pdo_odbc/
phpize
./configure --with-pdo-odbc=unixODBC,/usr
make
make install

#enable pdo_odbc
echo "extension=pdo_odbc.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
php -m
Loading

0 comments on commit 0840cfb

Please sign in to comment.