Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from Wikidata-lib/travis_config_merged
Travis config
- Loading branch information
Showing
8 changed files
with
106 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
language: php | ||
|
||
env: | ||
- DBTYPE=mysql | ||
- DBTYPE=sqlite | ||
php: | ||
- 5.3 | ||
|
||
before_script: | ||
- bash ./build/travis/before_script.sh | ||
|
||
script: | ||
- bash ./build/travis/script.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#! /bin/bash | ||
|
||
set -x | ||
|
||
originalDirectory=$(pwd) | ||
|
||
cd .. | ||
|
||
# checkout mediawiki | ||
wget https://github.com/wikimedia/mediawiki-core/archive/master.tar.gz | ||
tar -zxf master.tar.gz | ||
rm master.tar.gz | ||
mv mediawiki-core-master wiki | ||
|
||
# checkout wikibase | ||
wget https://github.com/wikimedia/mediawiki-extensions-Wikibase/archive/master.tar.gz | ||
tar -zxf master.tar.gz | ||
rm master.tar.gz | ||
mv mediawiki-extensions-Wikibase-master wiki/extensions/Wikibase | ||
|
||
cd wiki | ||
|
||
if [ $DBTYPE == "mysql" ] | ||
then | ||
mysql -e 'CREATE DATABASE its_a_mw;' | ||
fi | ||
|
||
php maintenance/install.php --dbtype $DBTYPE --dbuser root --dbname its_a_mw --dbpath $(pwd) --pass nyan TravisWiki admin | ||
|
||
cd extensions | ||
|
||
cp -r $originalDirectory PropertySuggester | ||
|
||
cd Wikibase | ||
composer install --prefer-source | ||
|
||
cd ../.. | ||
|
||
echo 'error_reporting(E_ALL| E_STRICT);' >> LocalSettings.php | ||
echo 'ini_set("display_errors", 1);' >> LocalSettings.php | ||
echo '$wgShowExceptionDetails = true;' >> LocalSettings.php | ||
echo '$wgDevelopmentWarnings = true;' >> LocalSettings.php | ||
echo '$wgLanguageCode = "en";' >> LocalSettings.php | ||
|
||
echo "define( 'WB_EXPERIMENTAL_FEATURES', true );" >> LocalSettings.php | ||
echo 'require_once __DIR__ . "/extensions/Wikibase/repo/Wikibase.php";' >> LocalSettings.php | ||
echo 'require_once __DIR__ . "/extensions/Wikibase/repo/ExampleSettings.php";' >> LocalSettings.php | ||
echo 'require_once __DIR__ . "/extensions/Wikibase/client/WikibaseClient.php";' >> LocalSettings.php | ||
echo 'require_once __DIR__ . "/extensions/PropertySuggester/PropertySuggester.php";' >> LocalSettings.php | ||
echo '$wgWBClientSettings["siteGlobalID"] = "enwiki";' >> LocalSettings.php | ||
|
||
php maintenance/update.php --quick |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#! /bin/bash | ||
|
||
set -x | ||
|
||
cd ../wiki/tests/phpunit | ||
|
||
php phpunit.php --debug --group PropertySuggester |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
|
||
CREATE TABLE wbs_propertyPairs( | ||
pid1 INT, | ||
pid2 INT, | ||
count INT, | ||
probability FLOAT, | ||
CREATE TABLE IF NOT EXISTS /*_*/wbs_propertypairs( | ||
pid1 INT unsigned NOT NULL, | ||
pid2 INT unsigned NOT NULL, | ||
count INT unsigned NOT NULL, | ||
probability FLOAT NOT NULL, | ||
PRIMARY KEY(pid1, pid2) | ||
); | ||
) /*$wgDBTableOptions*/; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters