forked from edwardspec/mediawiki-aws-s3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (59 loc) · 3.92 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
dist: trusty
sudo: false
language: php
git:
depth: 1
notifications:
email: false
services:
- mysql
env:
global:
- DBTYPE=mysql
- DBUSER=root
- secure: "S288kAeEv5c6nN6WUltprGjf+uUEH0/1q2uDVfvqfvefYSOQeQ5ZpnEkJfOAp1e1zqQW2Ff/4gg5D60Vz8TS70NjtlUBWW6RWy7vmvjrPfpOsuKNSep+0PJNkkDLeXMikkCdIcZ/+rCdn95vmV3xgWj2ueINyn5mXHjkcOPms6Sdn0qRAziT+BBI31WcLU4/7138JXs7Oay/BhINfUZq6E0Hv8mze48iTr7B0zBGzH0qPtQjzn86t0KIN6v3lDbU6FMLWZJjKh0ugibji2jjUNWmTqq/4e4qcVZq8bcFoxvQ+QKu26Vgk8b7q6YsKis18sW3cwV4sZprsvun7+K97wyrTqyriLLZyGomcRuczp6CiNAn8xkhTE20miq5Ff2shOm5wtYxzvr/HqzvsV8QjDl65OecSdWNAflmweFpqsLaajL6t03cisRUFU+KxQ5Yu2YEOEtUSsvHAvwlQEsIf6fOp34U+LrGbPSvom7cvbXDK1kgvQGiJqZgsq3vSWFM8KpMrAd9kU8vTs+WOn0ppzEzgVbajF1SYjrxmWZuiIc4CR4obng9sQymYdYnuDAqS4cg2rqQ4L6dQwbVezoobLw8ObjEhru8y7t4CgtGhN8so6UKT1WLIZzl/xg6Jud/mNvDwDptvXoBXXAXp+vppka+RudKgpUu6trgcYI+kQI="
- secure: "cQxAj3BlT4eVd60X8Zm6TQBQhSbdk0/tx0CNwQRdVpOvcBykcJv2I5YJRtyPEyZuqKEbswM5nZwdpG2K9CUU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PfMjgpsjP86vjTMWPrpjjZNFR+9i0FaRXL7Mv/XpEDn+4I1esZIQ+9sfvwYRGI6cNaRKlHyJNjVpRAqlT/eCapNpf2M9Ci0/k6d+QgiB98b6S5i/Gua88cnfr5D976wGqddyea9Q+yaFt9UAT6VYuezdA/826cI440yLaYDHLIvBV9g72ywdFfCmDLtfDKek0AZOEwd7Jj3EHIPM="
matrix:
include:
- env: branch=REL1_31
php: 7.2
- env: branch=REL1_27
php: 7.1
- env: branch=REL1_27
php: 5.6
cache:
directories:
- buildcache
before_script:
- phpenv config-rm xdebug.ini
- bash -ex ./tests/travis/build_mediawiki.sh "$branch"
- rsync -a --exclude buildcache --exclude mediawiki --exclude .git * mediawiki/extensions/AWS/
- cd mediawiki/extensions/AWS && composer install && cd -
- cd mediawiki
- >
php maintenance/install.php traviswiki admin
--pass travis
--dbtype "$DBTYPE"
--dbname traviswiki
--dbuser "$DBUSER"
--dbpass ""
--scriptpath "/w"
- echo -en "\n\nrequire_once __DIR__ . '/includes/DevelopmentSettings.php';\n" >> ./LocalSettings.php
- echo -en "\n\nrequire_once __DIR__ . '/extensions/AWS/tests/travis/AWSSettings.php';\n" >> ./LocalSettings.php
- php -l ./LocalSettings.php
- sed 's/AWSSettings/OldStyleAWSSettings/' LocalSettings.php >OldStyleLocalSettings.php
- php -l OldStyleLocalSettings.php
- export topdir="Test$(LC_ALL=C date +'%s')-$TRAVIS_JOB_NUMBER"
script:
- AWS_S3_TEST_TOP_DIRECTORY="$topdir" php tests/phpunit/phpunit.php extensions/AWS/tests/phpunit/
- >
mv OldStyleLocalSettings.php LocalSettings.php &&
AWS_S3_TEST_TOP_DIRECTORY="$topdir/oldStyle" php tests/phpunit/phpunit.php extensions/AWS/tests/phpunit/
after_script:
- ./vendor/bin/phpcs -ps extensions/AWS/
- pip install --user awscli
- mkdir -p ~/.aws
- echo -en "\n[default]\naws_access_key_id = ${AWS_KEY}\naws_secret_access_key = ${AWS_SECRET}\n" >>~/.aws/credentials
- echo -en "\n[default]\nregion = us-east-1\n" >>~/.aws/config
- ~/.local/bin/aws s3 rm --recursive s3://${AWS_BUCKET_PREFIX}/$topdir