Skip to content

Commit

Permalink
Merge pull request #231 from mfn/mfn-logger-detect-ci
Browse files Browse the repository at this point in the history
The Github Actions logger is now automatically detected
  • Loading branch information
maks-rafalko committed Jan 12, 2022
2 parents d04739d + a35dcd1 commit 506b766
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/guide/command-line-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ Can significantly improve performance since fewer Mutants are generated in compa

### `--logger-github`

Supposed to be used only with GitHub Actions. This logger prints GitHub Annotation warnings for escaped Mutants right in the Pull Request:
Supposed to be used only with GitHub Actions. This logger prints GitHub Annotation warnings for escaped Mutants right in the Pull Request.

<p class="tip">Note that the Github Actions environment is automatically detected and this switch isn't actually necessary when executed there.</p>

![GitHub Annotation Escaped Mutant](/images/github-logger.png)

Expand Down
2 changes: 1 addition & 1 deletion src/guide/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ You can commit it to the VCS and, if necessary, override it locally by creating
* `json` - machine-readable file in JSON format. Can be programmatically analyzed. In addition to general stats, contains original, mutated code, diff and test framework output for each Mutant.
* `perMutator` - a markdown file which will give a break-down of the effectiveness of each mutator.
Each of the above logs accept a local filename to write to (eg `infection.log`), or you can write to the terminal using `php://stdout` or `php://stderr`, this can be useful in CI to store the mutation results in the output.
* `github` - prints GitHub Annotation warnings right in the Pull Request. Supposed to be used with GitHub Actions. See [`--logger-github`](/guide/command-line-options.html#logger-github)
* `github` - prints GitHub Annotation warnings right in the Pull Request. Supposed to be used with GitHub Actions. See [`--logger-github`](/guide/command-line-options.html#logger-github), but usually not necessary as it is automatically detected.
* `tmpDir` - Optional. It's a folder where Infection creates its configs, caches and other stuff. It may be useful for people who doesn't have access to the default system temporary folder and/or doesn't have write permissions. Either absolute `/tmp/folder` or relative `var/cache` paths can be used.
* `phpUnit` - optional key
* `configDir` - custom directory path with `phpunit.xml.dist` file. This is useful for example for old Symfony app, where `phpunit.xml.dist` is located at `./app`
Expand Down

0 comments on commit 506b766

Please sign in to comment.