From 3f66722e973ce29118b632201afcbc2749cb2537 Mon Sep 17 00:00:00 2001 From: Joseph Bielawski Date: Fri, 10 May 2024 18:45:38 +0200 Subject: [PATCH 1/2] Adjust Inflection to run only on covered files --- .github/workflows/test-mutations.yml | 4 +++- inflection.json5.dist | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 inflection.json5.dist diff --git a/.github/workflows/test-mutations.yml b/.github/workflows/test-mutations.yml index 4216d4162..1f63d9193 100644 --- a/.github/workflows/test-mutations.yml +++ b/.github/workflows/test-mutations.yml @@ -77,4 +77,6 @@ jobs: run: "composer install --no-interaction --no-progress --no-suggest" - name: "Mutation Tests" - run: "composer test:mutation -- --logger-github=false" + run: | + git fetch origin $GITHUB_BASE_REF + composer test:mutation -- --logger-github=false --threads=max --git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF --ignore-msi-with-no-mutations diff --git a/inflection.json5.dist b/inflection.json5.dist new file mode 100644 index 000000000..c234afb51 --- /dev/null +++ b/inflection.json5.dist @@ -0,0 +1,12 @@ +{ + "$schema": "vendor/infection/infection/resources/schema.json", + "testFrameworkOptions": "--testsuite=unit", + "source": { + "directories": [ + "src" + ] + }, + "mutators": { + "@default": true, + } +} From e0ab2d7d059dbac2dc9ab3387bfa4e155593b525 Mon Sep 17 00:00:00 2001 From: Joseph Bielawski Date: Fri, 10 May 2024 19:08:56 +0200 Subject: [PATCH 2/2] Break something for testing purpose --- .../src/Flow/ETL/Adapter/Text/TextExtractor.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextExtractor.php b/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextExtractor.php index 475ff7e15..582a676c7 100644 --- a/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextExtractor.php +++ b/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextExtractor.php @@ -28,10 +28,6 @@ public function extract(FlowContext $context) : \Generator $rowData = \fgets($stream->resource()); - if ($rowData === false) { - return; - } - while ($rowData !== false) { if ($shouldPutInputIntoRows) { $row = [['text' => \rtrim($rowData), '_input_file_uri' => $stream->path()->uri()]];