From 03d562f587913bf0d9261f0de1e9e2363f2fa1d5 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Tue, 5 Jan 2021 04:17:55 +0100 Subject: [PATCH] Remove Travis support (#12416) Co-authored-by: CrazyMax --- .gitignore | 1 - .travis.yml | 49 ------------------------------ LibreNMS/Util/FileCategorizer.php | 3 +- tests/Unit/CiHelperTest.php | 2 +- tests/Unit/FileCategorizerTest.php | 2 +- 5 files changed, 3 insertions(+), 54 deletions(-) delete mode 100644 .travis.yml diff --git a/.gitignore b/.gitignore index 25958261f2..c713369ce4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ !/.gitignore !/.editorconfig !/.scrutinizer.yml -!/.travis.yml !/.php_cs !/.github/ !/.codeclimate.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 08ae03e3c3..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ -os: linux -language: php -addons: - chrome: stable -services: - - mysql -env: - global: - APP_ENV=testing -jobs: - fast_finish: true - include: - - php: 7.4 - dist: bionic - env: SKIP_STYLE_CHECK=1 SKIP_WEB_CHECK=1 - - php: 7.3 - dist: bionic - env: SKIP_UNIT_CHECK=1 - - php: 7.3 - dist: bionic - env: SKIP_STYLE_CHECK=1 SKIP_WEB_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 .env.travis .env - -install: - - travis_retry composer install --no-interaction --prefer-dist --no-suggest - - pip3 install --user snmpsim PyMySQL pylint - - test -n "$SKIP_WEB_CHECK" || php artisan dusk:update --detect - -after_failure: - - tail /tmp/snmpsimd.log - -before_script: - - phpenv config-rm xdebug.ini - - test -n "$SKIP_WEB_CHECK" || php artisan serve --env=dusk.testing 2>/dev/null & - - test -n "$SKIP_UNIT_CHECK" || ~/.local/bin/snmpsimd.py --data-dir=tests/snmpsim --agent-udpv4-endpoint=127.1.6.2:1162 --logging-method=file:/tmp/snmpsimd.log & - -script: - - php artisan dev:check ci diff --git a/LibreNMS/Util/FileCategorizer.php b/LibreNMS/Util/FileCategorizer.php index f04b4cf1cc..c90a525ec6 100644 --- a/LibreNMS/Util/FileCategorizer.php +++ b/LibreNMS/Util/FileCategorizer.php @@ -37,7 +37,6 @@ class FileCategorizer extends Categorizer if (getenv('CIHELPER_DEBUG')) { $this->setSkippable(function ($item) { return in_array($item, [ - '.travis.yml', '.github/workflows/test.yml', 'LibreNMS/Util/CiHelper.php', 'LibreNMS/Util/FileCategorizer.php', @@ -66,7 +65,7 @@ class FileCategorizer extends Categorizer return Str::startsWith($item, 'resources/') ? $item : false; }); $this->addCategory('full-checks', function ($item) { - return in_array($item, ['composer.lock', '.travis.yml', '.github/workflows/test.yml']) ? $item : false; + return in_array($item, ['composer.lock', '.github/workflows/test.yml']) ? $item : false; }); $this->addCategory('os-files', function ($item) { if (($os_name = $this->osFromFile($item)) !== null) { diff --git a/tests/Unit/CiHelperTest.php b/tests/Unit/CiHelperTest.php index 407655039b..e8d6c4ed9f 100644 --- a/tests/Unit/CiHelperTest.php +++ b/tests/Unit/CiHelperTest.php @@ -240,7 +240,7 @@ class CiHelperTest extends TestCase 'unit_svg' => true, ]); - putenv('FILES=.travis.yml'); + putenv('FILES=.github/workflows/test.yml'); $helper = new CiHelper(); $helper->detectChangedFiles(); $this->assertFlagsSet($helper, [ diff --git a/tests/Unit/FileCategorizerTest.php b/tests/Unit/FileCategorizerTest.php index fcb3fa8999..43aef77cfc 100644 --- a/tests/Unit/FileCategorizerTest.php +++ b/tests/Unit/FileCategorizerTest.php @@ -182,7 +182,7 @@ class FileCategorizerTest extends TestCase public function testFullChecks() { $this->assertCategorized(['full-checks' => ['composer.lock']]); - $this->assertCategorized(['full-checks' => ['.travis.yml']], ['other', '.travis.yml']); + $this->assertCategorized(['full-checks' => ['.github/workflows/test.yml']], ['other', '.github/workflows/test.yml']); $this->assertCategorized([ 'os' => ['3com', 'calix', 'ptp650', 'dd-wrt', 'arista_eos'],