diff --git a/src/Command.php b/src/Command.php index b540657..c748b14 100644 --- a/src/Command.php +++ b/src/Command.php @@ -129,6 +129,12 @@ protected function configure() 'The hostname to use in the status description. Use if automatically detected hostname is not desired.', gethostname() ); + $this->addOption( + 'groups', + null, + InputOption::VALUE_OPTIONAL, + 'Only run tests that are in the specified groups. Separate with a comma. Prefix with ! to exclude.' + ); $this->addArgument( 'filter', InputArgument::IS_ARRAY, @@ -378,9 +384,10 @@ protected function execute(InputInterface $input, OutputInterface $output) } else { // If the test has the ignore failure flag, ignore it. if (!empty($test['ignore-failure'])) { - $results_row[] = '✘ Failed (Ignoring)'; + $results_row[] = '! Failed but ignoring'; $params->state = 'success'; - $params->description .= ' | TEST FAILED but is set to ignore.'; + $params->description .= ' | TEST FAILED but is configured to ignore failures.'; + $this->warningLite('Test configured to ignore failures. Not triggering failure exit code or commit status.'); } else { $results_row[] = '✘ Failed'; $tests_failed = true; diff --git a/src/Test.php b/src/Test.php new file mode 100644 index 0000000..a02efd3 --- /dev/null +++ b/src/Test.php @@ -0,0 +1,39 @@ +rawYml = $raw_yml_object; + } + + private function parseYml() { + foreach ($this->rawYml as $name => $test_raw) { + + // Simplest: command + if (is_string($test_raw)) { + $this->addCommand($test_raw); + } + } + } + + /** + * Add to the + * @param $command + */ + private function addCommand($command) { + $commands[] = $command; + } + +} \ No newline at end of file diff --git a/src/TestSuite.php b/src/TestSuite.php new file mode 100644 index 0000000..e69de29 diff --git a/tests.yml b/tests.yml index 76a9507..932654a 100644 --- a/tests.yml +++ b/tests.yml @@ -1,6 +1,13 @@ # tests/phpunit: phpunit -yaml-tests/lint: find src -name '*.php' -print0 | xargs -0 -n1 php -l -yaml-tests/phpcs: bin/phpcs --standard=PSR2 -n src --colors +yaml-tests/lint: + command: find src -name '*.php' -print0 | xargs -0 -n1 php -l + group: static + +yaml-tests/phpcs: + command: bin/phpcs --standard=PSR2 -n src --colors + groups: + - static + - local yaml-tess/ignore-failure: command: thisisnotaworkingcommand