Wrong snmpsim endpoint for TravisCI pre-start (#11706)

* Wrong snmpsim endpoint for TravisCI pre-start

* Fix full check parsing
This commit is contained in:
Tony Murray
2020-05-26 13:18:27 -05:00
committed by GitHub
parent bb2ac27a1d
commit e292cc98cc
3 changed files with 11 additions and 5 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ after_failure:
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.1:1161 --logging-method=file:/tmp/snmpsimd.log &
- 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
+3 -4
View File
@@ -415,8 +415,8 @@ class CiHelper
private function parseChangedFiles()
{
if ($this->flags['full']) {
// nothing to do
if ($this->flags['full'] || !empty($this->changed['full-checks'])) {
$this->flags['full'] = true; // make sure full is set and skip changed file parsing
return;
}
$this->os = $this->os ?: $this->changed['os'];
@@ -429,11 +429,10 @@ class CiHelper
'unit_docs' => !empty($this->changed['docs']) && empty($this->changed['php']),
'unit_svg' => !empty($this->changed['svg']) && empty($this->changed['php']),
'docs_changed' => !empty($this->changed['docs']),
'full' => !empty($this->changed['full-checks']),
]);
$this->setFlags([
'unit_skip' => empty($this->changed['php']) && !array_sum(Arr::only($this->getFlags(), ['unit_os', 'unit_docs', 'unit_svg', 'unit_modules', 'docs_changed'])),
'unit_skip' => empty($this->changed['php']) && !array_sum(Arr::only($this->getFlags(), ['full', 'unit_os', 'unit_docs', 'unit_svg', 'unit_modules', 'docs_changed'])),
'lint_skip' => array_sum(Arr::only($this->getFlags(), ['lint_skip_php', 'lint_skip_python', 'lint_skip_bash'])) === 3,
'style_skip' => empty($this->changed['php']),
'web_skip' => empty($this->changed['php']) && empty($this->changed['resources']),
+7
View File
@@ -240,6 +240,13 @@ class CiHelperTest extends TestCase
'lint_skip_bash' => true,
'unit_svg' => true,
]);
putenv('FILES=.travis.yml');
$helper = new CiHelper();
$helper->detectChangedFiles();
$this->assertFlagsSet($helper, [
'full' => true,
]);
}
private function assertFlagsSet(CiHelper $helper, $flags = [])