-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
78 lines (70 loc) · 2.65 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
69
70
71
72
73
74
75
76
77
78
language: php
dist: xenial
matrix:
include:
- php: 7.1
env: DB=none;NOTESTS=1
- php: 7.1
env: DB=none;LANGTEST=1;NOTESTS=1
- php: 7.1.3
env: DB=mysqli
- php: 7.2
env: DB=mysqli
- php: 7.2
env: DB=mariadb
- php: 7.2
env: DB=postgres
- php: 7.2
env: DB=sqlite3
- php: 7.3
env: DB=mysqli
- php: 7.4
env: DB=mysqli
# Uncomment to also check in phpBB 3.2.x
- php: 7.1
env:
- DB=mysqli
- PHPBB_BRANCH="3.2.x"
- php: 7.0
env:
- DB=mysqli
- PHPBB_BRANCH="3.2.x"
- php: 5.6
env:
- DB=mysqli
- PHPBB_BRANCH="3.2.x"
fast_finish: true
env:
global:
- EXTNAME="gn36/firstpostedit" # CHANGE name of the extension HERE
- GITREPO="gn36/phpbb-ext-firstpostedit"
- SNIFF="1" # Should we run code sniffer on your code?
- IMAGE_ICC="1" # Should we run icc profile sniffer on your images?
- EPV="1" # Should we run EPV (Extension Pre Validator) on your code?
- PHPBB_BRANCH="3.3.x"
branches:
only:
- master
- develop
- /^dev\/.*$/
services:
- postgresql
- mysql
install:
- travis/prepare-phpbb.sh $PHPBB_BRANCH
- sh -c "if [ '$LANGTEST' = '1' ]; then composer remove phpbb/epv --dev --no-interaction; fi"
- sh -c "if [ '$LANGTEST' = '1' ]; then composer require phpbb/translation-validator:1.3.* --dev --no-interaction; fi"
- sh -c "if [ '$LANGTEST' = '1' ]; then travis/prepare-langtest.sh $EXTNAME $PHPBB_BRANCH ; fi"
- cd ../../phpBB3
- travis/prepare-extension.sh $EXTNAME $PHPBB_BRANCH
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- sh -c "if [ '$EPV' != '0' ] && [ '$NOTESTS' = '1' ] && [ '$LANGTEST' != '1' ]; then ../$GITREPO/travis/prepare-epv.sh $NOTESTS $NOTESTS; fi"
before_script:
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
script:
- sh -c "if [ '$SNIFF' != '0' ]; then travis/ext-sniff.sh $DB $TRAVIS_PHP_VERSION $EXTNAME $NOTESTS; fi"
- sh -c "if [ '$IMAGE_ICC' != '0' ]; then travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION; fi"
#- phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/phpunit.xml.dist --bootstrap ./tests/bootstrap.php
- sh -c "if [ '$NOTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/travis/phpunit-$DB-travis.xml --bootstrap ./tests/bootstrap.php; fi"
- sh -c "if [ '$EPV' != '0' ] && [ '$NOTESTS' = '1' ] && [ '$LANGTEST' != '1' ]; then phpBB/vendor/bin/EPV.php run --dir='phpBB/ext/$EXTNAME/'; fi"
- sh -c "if [ '$NOTESTS' = '1' ] && [ '$LANGTEST' = '1' ]; then ../langtest/travis/test-lang.sh; fi"