From a175175a8ee694fb53c9cad4f53bcba6618fdfb8 Mon Sep 17 00:00:00 2001 From: Corban Dallas Date: Wed, 6 Jan 2021 05:54:20 +0300 Subject: [PATCH 1/5] Updated configs for CI --- .arc_utils/.phutil_module_cache | 1 - .arc_utils/__phutil_library_init__.php | 3 - .arc_utils/__phutil_library_map__.php | 22 -- .arc_utils/src/.phutil_module_cache | 1 - .arc_utils/src/ArcanistEcsLintLinter.php | 108 --------- ...hedPHPUnitArcanistUnitTestResultParser.php | 140 ----------- .arc_utils/src/PatchedPhpUnitTestEngine.php | 225 ------------------ .arcconfig | 10 - .arclint | 10 - .github/labeler.config.yml | 2 - .github/workflows/ci.yml | 14 +- README.md | 1 + composer.json | 7 +- phpunit.github.xml | 32 --- phpunit.xml.dist | 21 +- tests/functional/Laravel/LaravelTestCase.php | 10 +- 16 files changed, 27 insertions(+), 580 deletions(-) delete mode 100644 .arc_utils/.phutil_module_cache delete mode 100644 .arc_utils/__phutil_library_init__.php delete mode 100644 .arc_utils/__phutil_library_map__.php delete mode 100644 .arc_utils/src/.phutil_module_cache delete mode 100644 .arc_utils/src/ArcanistEcsLintLinter.php delete mode 100644 .arc_utils/src/PatchedPHPUnitArcanistUnitTestResultParser.php delete mode 100644 .arc_utils/src/PatchedPhpUnitTestEngine.php delete mode 100644 .arcconfig delete mode 100644 .arclint delete mode 100644 phpunit.github.xml diff --git a/.arc_utils/.phutil_module_cache b/.arc_utils/.phutil_module_cache deleted file mode 100644 index cc2492e..0000000 --- a/.arc_utils/.phutil_module_cache +++ /dev/null @@ -1 +0,0 @@ -{"__symbol_cache_version__":11,"0663f356fa18f9944a3898203c596e32":{"have":{"class":{"ArcanistEcsLintLinter":19}},"need":{"function":{"pht":372,"execx":768,"id":2394},"class":{"ArcanistExternalLinter":49,"ArcanistLintMessage":2401,"ArcanistLintSeverity":2154}},"xmap":{"ArcanistEcsLintLinter":["ArcanistExternalLinter"]}},"5b4a1fb72c8ebacd12703c2f7b286e35":{"have":{"class":{"PatchedPHPUnitArcanistUnitTestResultParser":130}},"need":{"function":{"id":537},"class":{"ArcanistTestResultParser":181,"ArcanistUnitTestResult":544,"Filesystem":2989}},"xmap":{"PatchedPHPUnitArcanistUnitTestResultParser":["ArcanistTestResultParser"]}},"01746fa0fa525cf07c693b4bc47c0639":{"have":{"class":{"PatchedPhpUnitTestEngine":115}},"need":{"function":{"csprintf":1255,"array_mergev":2146,"id":2832,"pht":6592},"class":{"ArcanistUnitTestEngine":148,"TempFile":1065,"PatchedPHPUnitArcanistUnitTestResultParser":2839,"Filesystem":960}},"xmap":{"PatchedPhpUnitTestEngine":["ArcanistUnitTestEngine"]}}} \ No newline at end of file diff --git a/.arc_utils/__phutil_library_init__.php b/.arc_utils/__phutil_library_init__.php deleted file mode 100644 index cac7063..0000000 --- a/.arc_utils/__phutil_library_init__.php +++ /dev/null @@ -1,3 +0,0 @@ - 2, - 'class' => array( - 'ArcanistEcsLintLinter' => 'src/ArcanistEcsLintLinter.php', - 'PatchedPHPUnitArcanistUnitTestResultParser' => 'src/PatchedPHPUnitArcanistUnitTestResultParser.php', - 'PatchedPhpUnitTestEngine' => 'src/PatchedPhpUnitTestEngine.php', - ), - 'function' => array(), - 'xmap' => array( - 'ArcanistEcsLintLinter' => 'ArcanistExternalLinter', - 'PatchedPHPUnitArcanistUnitTestResultParser' => 'ArcanistTestResultParser', - 'PatchedPhpUnitTestEngine' => 'ArcanistUnitTestEngine', - ), -)); diff --git a/.arc_utils/src/.phutil_module_cache b/.arc_utils/src/.phutil_module_cache deleted file mode 100644 index b7d9240..0000000 --- a/.arc_utils/src/.phutil_module_cache +++ /dev/null @@ -1 +0,0 @@ -{"__symbol_cache_version__":11} \ No newline at end of file diff --git a/.arc_utils/src/ArcanistEcsLintLinter.php b/.arc_utils/src/ArcanistEcsLintLinter.php deleted file mode 100644 index bf63ab1..0000000 --- a/.arc_utils/src/ArcanistEcsLintLinter.php +++ /dev/null @@ -1,108 +0,0 @@ -getExecutableCommand()); - - return explode(' ', $stdout)[1] ?? false; - } - - public function getInstallInstructions() - { - return pht( - 'Install %s using `%s`.', - 'ECS', - 'composer require --dev symplify/easy-coding-standard'); - } - - public function getLinterConfigurationOptions() - { - $options = array( - 'config' => array( - 'type' => 'optional string', - 'help' => pht('A custom configuration file.'), - ), - ); - - return $options + parent::getLinterConfigurationOptions(); - } - - public function setLinterConfigurationValue($key, $value) - { - switch ($key) { - case 'config': - $this->config = $value; - return; - } - - return parent::setLinterConfigurationValue($key, $value); - } - - protected function getMandatoryFlags() - { - $fix = isset($_SERVER['FIX_FLAG']) ? ['--fix'] : []; - return array_merge([ - 'check', - '--no-progress-bar', - '--no-error-table', - '--no-interaction', - '--config=' . $this->config - ], $fix); - } - - protected function parseLinterOutput($path, $err, $stdout, $stderr) - { - - if (strpos($stdout, '[WARNING]') !== false) { - $severity = ArcanistLintSeverity::SEVERITY_WARNING; - } elseif (strpos($stdout, '[ERROR]') !== false) { - $severity = ArcanistLintSeverity::SEVERITY_ERROR; - } else { - return []; - } - - return [ - id(new ArcanistLintMessage()) - ->setPath($path) - ->setName($this->getLinterName()) - ->setDescription($stdout) - ->setSeverity($severity) - ]; - } -} diff --git a/.arc_utils/src/PatchedPHPUnitArcanistUnitTestResultParser.php b/.arc_utils/src/PatchedPHPUnitArcanistUnitTestResultParser.php deleted file mode 100644 index 922dce6..0000000 --- a/.arc_utils/src/PatchedPHPUnitArcanistUnitTestResultParser.php +++ /dev/null @@ -1,140 +0,0 @@ -=v6.0 - * @link https://secure.phabricator.com/T12785 - */ -final class PatchedPHPUnitArcanistUnitTestResultParser extends ArcanistTestResultParser { - - /** - * Parse test results from phpunit json report - * - * @param string $path Path to test - * @param string $test_results String containing phpunit json report - * - * @return array - */ - public function parseTestResults($path, $test_results) { - if (!$test_results) { - $result = id(new ArcanistUnitTestResult()) - ->setName($path) - ->setUserData($this->stderr) - ->setResult(ArcanistUnitTestResult::RESULT_BROKEN); - return array($result); - } - - $report = simplexml_load_string($test_results); - - // coverage is for all testcases in the executed $path - $coverage = array(); - - if ($this->enableCoverage !== false) { - $coverage = $this->readCoverage(); - } - - $last_test_finished = true; - - $results = array(); - - foreach ($report->testsuite as $test_suite) { - - $status = ArcanistUnitTestResult::RESULT_PASS; - $user_data = ''; - - if ((int)$test_suite['failures'] > 0) { - $status = ArcanistUnitTestResult::RESULT_FAIL; - foreach ($test_suite->testcase as $test_case) { - foreach ($test_case->failure as $failure) { - $user_data .= sprintf( - "\n%s", - (string)$failure); - } - } - } else if ($test_suite['errors'] > 0) { - $status = ArcanistUnitTestResult::RESULT_BROKEN; - foreach ($test_suite->testcase as $test_case) { - foreach ($test_case->error as $error) { - $user_data .= sprintf( - "\n%s", - (string)$error); - } - } - } - - $name = preg_replace('/ \(.*\)/s', '', $test_suite['name']); - - $result = new ArcanistUnitTestResult(); - $result->setName($name); - $result->setResult($status); - $result->setDuration((float)$test_suite['time']); - $result->setCoverage($coverage); - $result->setUserData($user_data); - - $results[] = $result; - $last_test_finished = true; - } - - if (!$last_test_finished) { - $results[] = id(new ArcanistUnitTestResult()) - ->setName($test_suite['name']) // use last event - ->setUserData($this->stderr) - ->setResult(ArcanistUnitTestResult::RESULT_BROKEN); - } - return $results; - } - - /** - * Read the coverage from phpunit generated clover report - * - * @return array - */ - private function readCoverage() { - $test_results = Filesystem::readFile($this->coverageFile); - if (empty($test_results)) { - return array(); - } - - $coverage_dom = new DOMDocument(); - $coverage_dom->loadXML($test_results); - - $reports = array(); - $files = $coverage_dom->getElementsByTagName('file'); - foreach ($files as $file) { - $class_path = $file->getAttribute('name'); - - // get total line count in file - $line_count = count(file($class_path)); - - $coverage = ''; - $any_line_covered = false; - $start_line = 1; - $lines = $file->getElementsByTagName('line'); - - $coverage = str_repeat('N', $line_count); - foreach ($lines as $line) { - if ($line->getAttribute('type') != 'stmt') { - continue; - } - if ((int)$line->getAttribute('count') > 0) { - $is_covered = 'C'; - $any_line_covered = true; - } else { - $is_covered = 'U'; - } - $line_no = (int)$line->getAttribute('num'); - $coverage[$line_no - 1] = $is_covered; - } - - // Sometimes the Clover coverage gives false positives on uncovered lines - // when the file wasn't actually part of the test. This filters out files - // with no coverage which helps give more accurate overall results. - if ($any_line_covered) { - $len = strlen($this->projectRoot.DIRECTORY_SEPARATOR); - $class_path = substr($class_path, $len); - $reports[$class_path] = $coverage; - } - } - - return $reports; - } -} diff --git a/.arc_utils/src/PatchedPhpUnitTestEngine.php b/.arc_utils/src/PatchedPhpUnitTestEngine.php deleted file mode 100644 index ec2be56..0000000 --- a/.arc_utils/src/PatchedPhpUnitTestEngine.php +++ /dev/null @@ -1,225 +0,0 @@ -=v6.0 - * @link https://secure.phabricator.com/T12785 - */ -final class PatchedPhpUnitTestEngine extends ArcanistUnitTestEngine { - - protected $enableCoverage; - - private $configFile; - private $phpunitBinary = 'phpunit'; - private $testPaths; - private $projectRoot; - - public function setProjectRoot($projectRoot) - { - $this->projectRoot = $projectRoot; - return $this; - } - - public function setTestPaths(array $paths) - { - $this->testPaths = $paths; - return $this; - } - - public function run() { - $this->projectRoot = $this->projectRoot ?? $this->getWorkingCopy()->getProjectRoot(); - $this->testPaths = $this->testPaths ?? [$this->projectRoot . '/tests']; - - $this->loadConfig(); - - $this->prepareConfigFile(); - $futures = array(); - $tmpfiles = array(); - foreach ($this->testPaths as $test_path) { - if (!Filesystem::pathExists($test_path)) { - continue; - } - $xml_tmp = new TempFile(); - $clover_tmp = null; - $clover = null; - if ($this->getEnableCoverage()) { - $clover_tmp = new TempFile(); - $clover = csprintf('--coverage-clover %s', $clover_tmp); - } - - $config = $this->configFile ? csprintf('-c %s', $this->configFile) : null; - - $stderr = '-d display_errors=stderr'; - - $cmd = "{$this->phpunitBinary} $config $stderr --log-junit $xml_tmp $clover $test_path"; - - $futures[$test_path] = $cmd; - $tmpfiles[$test_path] = array( - 'xml' => $xml_tmp, - 'clover' => $clover_tmp, - ); - } - - $results = array(); - foreach ($futures as $test => $future) { - $output = []; - exec($future, $output); - list($err, $stdout, $stderr) = $output; - - $results[] = $this->parseTestResults( - $test, - $tmpfiles[$test]['xml'], - $tmpfiles[$test]['clover'], - $stderr); - } - - return array_mergev($results); - } - - private function loadConfig() { - $this->setEnableCoverage( - $this->getConfigurationManager()->getConfigFromAnySource('enable_coverage') !== "false" - ); - } - - /** - * Parse test results from phpunit json report. - * - * @param string $path Path to test - * @param string $json_tmp Path to phpunit json report - * @param string $clover_tmp Path to phpunit clover report - * @param string $stderr Data written to stderr - * - * @return array - */ - private function parseTestResults($path, $xml_tmp, $clover_tmp, $stderr) { - $test_results = Filesystem::readFile($xml_tmp); - return id(new PatchedPHPUnitArcanistUnitTestResultParser()) - ->setEnableCoverage($this->getEnableCoverage()) - ->setProjectRoot($this->projectRoot) - ->setCoverageFile($clover_tmp) - ->setAffectedTests($this->testPaths) - ->setStderr($stderr) - ->parseTestResults($path, $test_results); - } - - /** - * Get places to look for PHP Unit tests that cover a given file. For some - * file "/a/b/c/X.php", we look in the same directory: - * - * /a/b/c/ - * - * We then look in all parent directories for a directory named "tests/" - * (or "Tests/"): - * - * /a/b/c/tests/ - * /a/b/tests/ - * /a/tests/ - * /tests/ - * - * We also try to replace each directory component with "tests/": - * - * /a/b/tests/ - * /a/tests/c/ - * /tests/b/c/ - * - * We also try to add "tests/" at each directory level: - * - * /a/b/c/tests/ - * /a/b/tests/c/ - * /a/tests/b/c/ - * /tests/a/b/c/ - * - * This finds tests with a layout like: - * - * docs/ - * src/ - * tests/ - * - * ...or similar. This list will be further pruned by the caller; it is - * intentionally filesystem-agnostic to be unit testable. - * - * @param string PHP file to locate test cases for. - * @return list List of directories to search for tests in. - */ - public static function getSearchLocationsForTests($path) { - $file = basename($path); - $dir = dirname($path); - - $test_dir_names = array('tests', 'Tests'); - - $try_directories = array(); - - // Try in the current directory. - $try_directories[] = array($dir); - - // Try in a tests/ directory anywhere in the ancestry. - foreach (Filesystem::walkToRoot($dir) as $parent_dir) { - if ($parent_dir == '/') { - // We'll restore this later. - $parent_dir = ''; - } - foreach ($test_dir_names as $test_dir_name) { - $try_directories[] = array($parent_dir, $test_dir_name); - } - } - - // Try replacing each directory component with 'tests/'. - $parts = trim($dir, DIRECTORY_SEPARATOR); - $parts = explode(DIRECTORY_SEPARATOR, $parts); - foreach (array_reverse(array_keys($parts)) as $key) { - foreach ($test_dir_names as $test_dir_name) { - $try = $parts; - $try[$key] = $test_dir_name; - array_unshift($try, ''); - $try_directories[] = $try; - } - } - - // Try adding 'tests/' at each level. - foreach (array_reverse(array_keys($parts)) as $key) { - foreach ($test_dir_names as $test_dir_name) { - $try = $parts; - $try[$key] = $test_dir_name.DIRECTORY_SEPARATOR.$try[$key]; - array_unshift($try, ''); - $try_directories[] = $try; - } - } - - $results = array(); - foreach ($try_directories as $parts) { - $results[implode(DIRECTORY_SEPARATOR, $parts).DIRECTORY_SEPARATOR] = true; - } - - return array_keys($results); - } - - /** - * Tries to find and update phpunit configuration file based on - * `phpunit_config` option in `.arcconfig`. - */ - private function prepareConfigFile() { - $project_root = $this->projectRoot.DIRECTORY_SEPARATOR; - $config = $this->getConfigurationManager()->getConfigFromAnySource('phpunit_config'); - - if ($config) { - if (Filesystem::pathExists($project_root.$config)) { - $this->configFile = $project_root.$config; - } else { - throw new Exception( - pht( - 'PHPUnit configuration file was not found in %s', - $project_root.$config)); - } - } - $bin = $this->getConfigurationManager()->getConfigFromAnySource( - 'unit.phpunit.binary'); - if ($bin) { - if (Filesystem::binaryExists($bin)) { - $this->phpunitBinary = $bin; - } else { - $this->phpunitBinary = Filesystem::resolvePath($bin, $project_root); - } - } - } - -} diff --git a/.arcconfig b/.arcconfig deleted file mode 100644 index 8cbfb05..0000000 --- a/.arcconfig +++ /dev/null @@ -1,10 +0,0 @@ -{ - "phabricator.uri" : "https://phab.task4work.info/", - "load": [ - ".arc_utils" - ], - "unit.engine": "PatchedPhpUnitTestEngine", - "unit.phpunit.binary": "vendor/bin/phpunit", - "phpunit_config": "phpunit.xml", - "enable_coverage": "true" -} diff --git a/.arclint b/.arclint deleted file mode 100644 index 324f853..0000000 --- a/.arclint +++ /dev/null @@ -1,10 +0,0 @@ -{ - "linters" : { - "ecs" : { - "type" : "ecs", - "include" : "(\\.php)", - "exclude": "(^\\.arc_utils/)", - "bin": "vendor/bin/ecs" - } - } -} diff --git a/.github/labeler.config.yml b/.github/labeler.config.yml index 6c44f36..4b0172e 100644 --- a/.github/labeler.config.yml +++ b/.github/labeler.config.yml @@ -1,14 +1,12 @@ type:build: - ".github/**/*" - ".coveralls.yml" - - "phpunit.github.xml" - ".gitignore" - "ecs.yml" - "phpcs.xml" dependencies: - "composer.json" - - "composer.lock" type:integration: - "src/Integration/**/*" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index afc9e53..c1f60fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,7 @@ env: DB_USER: 'postgres' DB_NAME: 'testing' DB_PASSWORD: 'postgres' + DB_HOST: '127.0.0.1' jobs: lint: @@ -144,13 +145,12 @@ jobs: working-directory: './' - name: 'Run Unit Tests with PHPUnit' continue-on-error: ${{ matrix.experimental }} - env: - POSTGRES_USER: ${{ env.DB_USER }} - POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }} - POSTGRES_DB: ${{ env.DB_NAME }} - POSTGRES_HOST: 127.0.0.1 - POSTGRES_PORT: 5432 run: | + sed -e "s/\${USERNAME}/${{ env.DB_USER }}/" \ + -e "s/\${PASSWORD}/${{ env.DB_PASSWORD }}/" \ + -e "s/\${DATABASE}/${{ env.DB_NAME }}/" \ + -e "s/\${HOST}/${{ env.DB_HOST }}/" \ + phpunit.xml.dist > phpunit.xml if [[ ${{ matrix.coverage }} == true ]]; then ./vendor/bin/phpunit --verbose --stderr --configuration phpunit.github.xml --coverage-clover build/logs/clover.xml --coverage-text else @@ -162,7 +162,7 @@ jobs: env: COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} COVERALLS_PARALLEL: true - COVERALLS_FLAG_NAME: php-${{ matrix.php_versions }}-postgres-${{ matrix.postgres }} + COVERALLS_FLAG_NAME: php-${{ matrix.php_versions }}-laravel-${{ matrix.laravel }}-postgres-${{ matrix.postgres }} run: ./vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v coverage: needs: test diff --git a/README.md b/README.md index 024e2be..cc96758 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ [![Total Downloads](https://poser.pugx.org/umbrellio/php-table-sync/downloads.png)](https://packagist.org/packages/umbrellio/php-table-sync) [![Code Intelligence Status](https://scrutinizer-ci.com/g/umbrellio/php-table-sync/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence) [![Build Status](https://scrutinizer-ci.com/g/umbrellio/php-table-sync/badges/build.png?b=master)](https://scrutinizer-ci.com/g/umbrellio/php-table-sync/build-status/master) +[![Code Coverage](https://scrutinizer-ci.com/g/umbrellio/php-table-sync/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/umbrellio/php-table-sync/?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/umbrellio/php-table-sync/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/umbrellio/php-table-sync/?branch=master) diff --git a/composer.json b/composer.json index cb49726..e1ba34c 100644 --- a/composer.json +++ b/composer.json @@ -45,8 +45,8 @@ } ], "support": { - "issues": "https://github.com/umbrellio/table_sync_php/issues", - "source": "https://github.com/umbrellio/table_sync_php" + "issues": "https://github.com/umbrellio/php-table-sync/issues", + "source": "https://github.com/umbrellio/php-table-sync" }, "minimum-stability": "stable", "autoload": { @@ -62,9 +62,6 @@ "scripts": { "lint-fix":[ "vendor/bin/ecs check src tests -c ecs.yml --fix" - ], - "test":[ - "vendor/bin/phpunit" ] }, "extra": { diff --git a/phpunit.github.xml b/phpunit.github.xml deleted file mode 100644 index 572791c..0000000 --- a/phpunit.github.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - ./src - - - - - - - - - - - - - - - ./tests - - - diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 4d4282e..b32a479 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -6,20 +6,23 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" - stopOnFailure="true" + stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" - > +> - - ./src - + ./src + + ./database + + + - - - - + + + + diff --git a/tests/functional/Laravel/LaravelTestCase.php b/tests/functional/Laravel/LaravelTestCase.php index 63806bd..c33f685 100644 --- a/tests/functional/Laravel/LaravelTestCase.php +++ b/tests/functional/Laravel/LaravelTestCase.php @@ -64,11 +64,11 @@ private function getConnectionParams(): array { return [ 'driver' => $GLOBALS['db_type'] ?? 'pdo_pgsql', - 'user' => env('POSTGRES_USER', $GLOBALS['db_username']), - 'password' => env('POSTGRES_PASSWORD', $GLOBALS['db_password']), - 'host' => env('POSTGRES_HOST', $GLOBALS['db_host']), - 'database' => env('POSTGRES_DB', $GLOBALS['db_database']), - 'port' => env('POSTGRES_PORT', $GLOBALS['db_port']), + 'user' => $GLOBALS['db_username'], + 'password' => $GLOBALS['db_password'], + 'host' => $GLOBALS['db_host'], + 'database' => $GLOBALS['db_database'], + 'port' => $GLOBALS['db_port'], ]; } } From 433f576cf4652febc4658feb199c4c310f0ccd7e Mon Sep 17 00:00:00 2001 From: Corban Dallas Date: Wed, 6 Jan 2021 05:56:14 +0300 Subject: [PATCH 2/5] bash fixes --- tests.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests.sh b/tests.sh index fd44eee..d79c2fa 100755 --- a/tests.sh +++ b/tests.sh @@ -1,5 +1,11 @@ #!/usr/bin/env bash psql postgres -U user -tc "SELECT 1 FROM pg_database WHERE datname = 'testing'" | grep -q 1 || psql postgres -U user -c "CREATE DATABASE testing" +sed -e "s/\${USERNAME}/postgres/" \ + -e "s/\${PASSWORD}//" \ + -e "s/\${DATABASE}/testing/" \ + -e "s/\${HOST}/127.0.0.1/" \ + phpunit.xml.dist > phpunit.xml +composer update composer lint-fix php -d pcov.directory='.' vendor/bin/phpunit --coverage-html build --coverage-text From 6ad6e87e62b7e42abfbb70b6f2f0c5595d365e06 Mon Sep 17 00:00:00 2001 From: Corban Dallas Date: Wed, 6 Jan 2021 05:57:45 +0300 Subject: [PATCH 3/5] ci fixes --- .github/assignee.config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/assignee.config.yml b/.github/assignee.config.yml index afedee5..e6506cc 100644 --- a/.github/assignee.config.yml +++ b/.github/assignee.config.yml @@ -4,8 +4,6 @@ numberOfReviewers: 1 reviewers: - pvsaitpe - - vetal - - zlob addAssignees: true From e2dd22baaf92d70aa9cc26e8545f135d9b819e6a Mon Sep 17 00:00:00 2001 From: Corban Dallas Date: Wed, 6 Jan 2021 06:12:15 +0300 Subject: [PATCH 4/5] ci fixes --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1f60fc..3eb71d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -152,9 +152,9 @@ jobs: -e "s/\${HOST}/${{ env.DB_HOST }}/" \ phpunit.xml.dist > phpunit.xml if [[ ${{ matrix.coverage }} == true ]]; then - ./vendor/bin/phpunit --verbose --stderr --configuration phpunit.github.xml --coverage-clover build/logs/clover.xml --coverage-text + ./vendor/bin/phpunit --verbose --stderr --coverage-clover build/logs/clover.xml --coverage-text else - ./vendor/bin/phpunit --verbose --stderr --configuration phpunit.github.xml + ./vendor/bin/phpunit --verbose --stderr fi working-directory: './' - name: 'Upload coverage results to Coveralls' From eb61db805143e0b692a802a682661411077af6db Mon Sep 17 00:00:00 2001 From: Corban Dallas Date: Wed, 6 Jan 2021 06:17:59 +0300 Subject: [PATCH 5/5] phpunit fixes --- phpunit.xml.dist | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index b32a479..0e0d032 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -9,12 +9,14 @@ stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" > - - ./src - - ./database - - + + + ./src + + ./database + + +