mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
3985ce74ce
* Shift return type of base TestCase methods From the [PHPUnit 8 release notes][1], the `TestCase` methods below now declare a `void` return type: - `setUpBeforeClass()` - `setUp()` - `assertPreConditions()` - `assertPostConditions()` - `tearDown()` - `tearDownAfterClass()` - `onNotSuccessfulTest()` [1]: https://phpunit.de/announcements/phpunit-8.html * Update PHPUnit to 8.x Part of Laravel 6 upgrade * Bump php versions Co-authored-by: Laravel Shift <shift@laravelshift.com> Co-authored-by: Tony Murray <murraytony@gmail.com>
57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
sudo: required
|
|
language: php
|
|
addons:
|
|
chrome: stable
|
|
services:
|
|
- mysql
|
|
env:
|
|
global:
|
|
APP_ENV=testing
|
|
matrix:
|
|
fast_finish: true
|
|
include:
|
|
- php: 7.4
|
|
env: SKIP_STYLE_CHECK=1
|
|
- php: 7.3
|
|
env: SKIP_UNIT_CHECK=1 BROWSER_TEST=1 CHROME_HEADLESS=1
|
|
- php: 7.2
|
|
env: SKIP_STYLE_CHECK=1 EXECUTE_BUILD_DOCS=true
|
|
|
|
cache:
|
|
directories:
|
|
- vendor
|
|
- $HOME/.cache/pip
|
|
- $HOME/.composer/cache
|
|
|
|
before_install:
|
|
- sudo apt-get -qq update
|
|
- sudo apt-get install -y snmp fping python3-pip python3-setuptools
|
|
- mysql -e 'CREATE DATABASE librenms_phpunit_78hunjuybybh CHARACTER SET utf8 COLLATE utf8_unicode_ci;'
|
|
- cp tests/config/config.test.php config.php
|
|
|
|
install:
|
|
- travis_retry composer install --no-interaction --prefer-dist --no-suggest
|
|
- pip3 install --user snmpsim
|
|
- pip install --user mysql-python pylint
|
|
|
|
after_failure:
|
|
- tail /tmp/snmpsimd.log
|
|
|
|
before_script:
|
|
- phpenv config-rm xdebug.ini
|
|
- test -z "$BROWSER_TEST" || php artisan dusk:update --detect
|
|
- test -z "$BROWSER_TEST" || php artisan serve --env=dusk.testing 2>/dev/null &
|
|
|
|
script:
|
|
- set -e
|
|
- export FILES=$(git diff --diff-filter=d --name-only master | tr '\n' ' '|sed 's/,*$//g')
|
|
- php scripts/pre-commit.php -q -l
|
|
- php scripts/pre-commit.php -q -s
|
|
- php scripts/pre-commit.php -u --db --snmpsim --fail-fast
|
|
- test -z "$BROWSER_TEST" || php artisan config:clear
|
|
- test -z "$BROWSER_TEST" || php artisan dusk
|
|
- bash -n daily.sh
|
|
- pylint -E poller-wrapper.py discovery-wrapper.py services-wrapper.py
|
|
- bash scripts/deploy-docs.sh
|
|
- set +e
|