Skip to content
This repository was archived by the owner on Jun 11, 2024. It is now read-only.

Commit 1dad261

Browse files
authored
Merge pull request #420 from AKSW/feature/travis
Enable Travis tests for all testsuites
2 parents 35feb90 + f92dc35 commit 1dad261

File tree

6 files changed

+425
-0
lines changed

6 files changed

+425
-0
lines changed

.travis.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
language: php
2+
3+
php:
4+
- 5.4
5+
- 5.6
6+
- 7.0
7+
- 7.1
8+
9+
env:
10+
- VIRTUOSO=6.1.7
11+
- VIRTUOSO=7.1.0
12+
- VIRTUOSO=7.2.4.2
13+
14+
matrix:
15+
fast_finish: true
16+
include:
17+
- php: 5.4
18+
env: VIRTUOSO=6.1.4
19+
- php: 5.4
20+
env: VIRTUOSO=6.1.6
21+
- php: 5.4
22+
env: VIRTUOSO=7.2.0
23+
allow_failures:
24+
- php: 7.0
25+
- php: 7.1
26+
27+
cache:
28+
directories:
29+
- $HOME/.composer/cache
30+
- virtuoso-opensource
31+
32+
sudo: true
33+
34+
services:
35+
- mysql
36+
37+
before_install:
38+
- bash ./application/scripts/travis/install-extensions.sh
39+
- bash ./application/scripts/travis/install-services.sh
40+
- sudo apt-get -qq update
41+
- sudo apt-get install -y raptor2-utils
42+
- phpenv config-rm xdebug.ini
43+
- mysql -e 'CREATE DATABASE ontowiki_TEST;'
44+
45+
install:
46+
- travis_retry composer install --no-interaction
47+
48+
before_script:
49+
- cp ./application/tests/config.ini.dist.travis ./application/tests/config.ini
50+
- make directories
51+
52+
script:
53+
- vendor/bin/phpunit --testsuite "OntoWiki Unit Tests"
54+
- EF_STORE_ADAPTER=zenddb vendor/bin/phpunit --testsuite "OntoWiki ZendDB Integration Tests"
55+
- EF_STORE_ADAPTER=virtuoso vendor/bin/phpunit --testsuite "OntoWiki Virtuoso Integration Tests"
56+
- vendor/bin/phpunit --testsuite "OntoWiki Extensions Tests"

application/scripts/travis/README.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
- `install-services.sh` to handle the install of additional services
2+
3+
## SPARQL services
4+
5+
This file and scripts are taken form the SemanticMediaWiki repo and only selected files where copied for running tests with virtuoso.
6+
It is taken as of commit 721a63d3a73400300f73e0a088196a6ed0fe5afd from https://github.com/SemanticMediaWiki/SemanticMediaWiki.
7+
The unsupported services are marked with *Enabled* "No".
8+
9+
<table>
10+
<tr>
11+
<th>Enabled</th>
12+
<th>Service</th>
13+
<th>Connector</th>
14+
<th>QueryEndPoint</th>
15+
<th>UpdateEndPoint</th>
16+
<th>DataEndpoint</th>
17+
<th>DefaultGraph</th>
18+
<th>Comments</th>
19+
</tr>
20+
<tr>
21+
<th>No</th>
22+
<th>Fuseki (mem)<sup>1</sup></th>
23+
<td>Fuseki</td>
24+
<td>http://localhost:3030/db/query</td>
25+
<td>http://localhost:3030/db/update</td>
26+
<td>''</td>
27+
<td>''</td>
28+
<td>fuseki-server --update --port=3030 --mem /db</td>
29+
</tr>
30+
<tr>
31+
<th>No</th>
32+
<th>Fuseki (memTDB)</th>
33+
<td>Fuseki</td>
34+
<td>http://localhost:3030/db/query</td>
35+
<td>http://localhost:3030/db/update</td>
36+
<td>''</td>
37+
<td>http://example.org/myFusekiGraph</td>
38+
<td>fuseki-server --update --port=3030 --memTDB --set tdb:unionDefaultGraph=true /db</td>
39+
</tr>
40+
<tr>
41+
<th>Yes</th>
42+
<th>Virtuoso opensource</th>
43+
<td>Virtuoso</td>
44+
<td>http://localhost:8890/sparql</td>
45+
<td>http://localhost:8890/sparql</td>
46+
<td>''</td>
47+
<td>http://example.org/myVirtuosoGraph</td>
48+
<td>sudo apt-get install virtuoso-opensource</td>
49+
</tr>
50+
<tr>
51+
<th>No</th>
52+
<th>4store<sup>2</sup></th>
53+
<td>4store</td>
54+
<td>http://localhost:8088/sparql/</td>
55+
<td>http://localhost:8088/update/</td>
56+
<td>''</td>
57+
<td>http://example.org/myFourGraph</td>
58+
<td>apt-get install 4store</td>
59+
</tr>
60+
<tr>
61+
<th>No</th>
62+
<th>Sesame</th>
63+
<td>Custom</td>
64+
<td>http://localhost:8080/openrdf-sesame/repositories/test-smw</td>
65+
<td>http://localhost:8080/openrdf-sesame/repositories/test-smw/statements</td>
66+
<td>''</td>
67+
<td>`test-smw` is specifed as native in-memory store</td>
68+
<td></td>
69+
</tr>
70+
71+
</table>
72+
73+
<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.
74+
75+
<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) )
76+
77+
[fuseki]: https://jena.apache.org/
78+
[virtuoso]: https://github.com/openlink/virtuoso-opensource
79+
[4store]: https://github.com/garlik/4store
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash
2+
3+
echo $TRAVIS_PHP_VERSION
4+
5+
# skip hhvm
6+
if [[ $TRAVIS_PHP_VERSION = "hhv"* ]]; then
7+
exit 0
8+
fi
9+
10+
# get build dependencies
11+
sudo apt-get install -y unixODBC-dev
12+
13+
PHPVERSION=$( php -v | head -n1 | sed "s|^PHP \([0-9][0-9\.]*\).*$|\1|" | tr -d '\n' )
14+
15+
ls ~/.phpenv/versions/
16+
echo "PHPVERSION: " $PHPVERSION
17+
echo "LOADED CONFIG: " `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
18+
19+
# get php sources
20+
wget https://github.com/php/php-src/archive/php-$PHPVERSION.tar.gz
21+
ls
22+
tar -xzf php-$PHPVERSION.tar.gz
23+
24+
# build odbc extension
25+
cd php-src-php-$PHPVERSION/ext/odbc/
26+
phpize
27+
# use fix from https://github.com/docker-library/php/issues/103
28+
sed -ri 's@^ *test +"\$PHP_.*" *= *"no" *&& *PHP_.*=yes *$@#&@g' configure
29+
./configure --with-unixODBC=shared,/usr
30+
make
31+
make install
32+
33+
# enable odbc
34+
echo "extension=odbc.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
35+
36+
# build pdo_odbc
37+
cd ../pdo_odbc/
38+
phpize
39+
./configure --with-pdo-odbc=unixODBC,/usr
40+
make
41+
make install
42+
43+
#enable pdo_odbc
44+
echo "extension=pdo_odbc.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
45+
php -m

0 commit comments

Comments
 (0)