mirror of
https://github.com/librenms/librenms.git
synced 2024-09-23 11:29:23 +00:00
![Tony Murray](/assets/img/avatar_default.png)
* Unit test to validate the db schema Changes build-schema.php to just write misc/db_schema.yaml * Only build base if needed Fix 178.sql * Database is always created by init.php add dbSchema test too, should guard against testing against an empty database * feature: support non-standard unix socket (#5724) * Add support for custom MySQL unix-socket * NULL must be lowercase! * Naive edit of html/install.php * fixup * Refactor dbConnect Use it everywhere * $config needs to be global Don't need to set $database_link * small cleanups * Connect to the database for every test. * travis fix for blank line
56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
sudo: required
|
|
language: php
|
|
services:
|
|
- mysql
|
|
matrix:
|
|
fast_finish: true
|
|
include:
|
|
- php: 7.0
|
|
- php: 5.3
|
|
env: SKIP_STYLE_CHECK=1
|
|
- php: 5.4
|
|
env: SKIP_STYLE_CHECK=1
|
|
- php: 5.5
|
|
env: SKIP_STYLE_CHECK=1
|
|
- php: 5.6
|
|
env: SKIP_STYLE_CHECK=1 EXECUTE_BUILD_DOCS=true EXECUTE_BUILD_SCHEMA=false
|
|
# - php: hhvm
|
|
# env: SKIP_STYLE_CHECK=1
|
|
|
|
allow_failures:
|
|
- php: hhvm
|
|
|
|
cache:
|
|
directories:
|
|
- vendor
|
|
- $HOME/.cache/pip
|
|
- $HOME/.composer/cache
|
|
|
|
before_install:
|
|
- sudo apt-get -qq update
|
|
- sudo apt-get install -y snmp
|
|
- mysql -e 'CREATE DATABASE librenms_phpunit_78hunjuybybh;'
|
|
|
|
install:
|
|
- composer install --prefer-dist --no-interaction
|
|
- pip install --user pyasn1==0.2.2
|
|
- pip install --user snmpsim==0.3.1
|
|
- pip install --user pylint
|
|
|
|
before_script:
|
|
- python2 $HOME/.local/bin/snmpsimd.py --data-dir=$TRAVIS_BUILD_DIR/tests/snmpsim --agent-udpv4-endpoint=127.0.0.1:11161 --logging-method=file:/tmp/snmpsimd.log --daemon --pid-file=/tmp/snmpsimd.pid
|
|
|
|
after_success:
|
|
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && test $EXECUTE_BUILD_SCHEMA == "true" && bash scripts/deploy-schema.sh
|
|
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && test $EXECUTE_BUILD_DOCS == "true" && bash scripts/deploy-docs.sh
|
|
|
|
after_failure:
|
|
- cat /tmp/snmpsimd.log
|
|
|
|
script:
|
|
- php scripts/pre-commit.php -l
|
|
- php scripts/pre-commit.php -s
|
|
- SNMPSIM=1 DBTEST=1 vendor/bin/phpunit --stop-on-failure
|
|
- bash -n daily.sh
|
|
- pylint -E poller-wrapper.py discovery-wrapper.py poller-service.py
|