-
Notifications
You must be signed in to change notification settings - Fork 136
/
.travis.yml
71 lines (60 loc) · 1.72 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
if: (repo = chilek/lms) OR (branch =~ /^stable/)
env:
global:
- COMPOSER_DISABLE_XDEBUG_WARN="1"
matrix:
include:
- os: linux
language: php
php: 7.3
dist: xenial
env:
PHPCS_VER="^3"
PHPCS_STANDARD="phpcs3.xml"
INSTALL_PHP_ZIP_EXTENSION=false
- os: linux
language: php
php: 7.4
dist: xenial
env:
PHPCS_VER="^3"
PHPCS_STANDARD="phpcs3.xml"
INSTALL_PHP_ZIP_EXTENSION=true
- os: linux
language: php
php: 8.0
dist: xenial
env:
PHPCS_VER="^3"
PHPCS_STANDARD="phpcs3.xml"
INSTALL_PHP_ZIP_EXTENSION=true
addons:
postgresql: 9.4
services:
- postgresql
- mysql
#before_install:
# - if ${INSTALL_PHP_ZIP_EXTENSION}; then sudo apt-get install libzip-dev; pecl install zip; fi
# - echo "extension = libzip.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# - echo "extension = snmp.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
install:
- composer install
before_script:
- psql -c 'create database lms;' -U postgres
- psql -U postgres -f doc/lms.pgsql
- mysql -e 'CREATE DATABASE lms;'
- mysql lms < doc/lms.mysql
- if find . -name "*.php" ! -path "./vendor/*" -print0 | xargs -0 -n 1 -P 8 php -l | grep -v "No syntax errors detected"; then exit 1; fi
- if find templates -type f -iname '*.html' | xargs devel/smartylint.php |grep -i "syntax error"; then exit 1; fi
- ./vendor/bin/phpcs --standard=$PHPCS_STANDARD .
- npm install -g jshint
- jshint .
#- ./vendor/bin/phpunit
script: true
notifications:
email:
# recipients:
on_success: change
on_failure: always