Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mheap committed Jan 18, 2020
0 parents commit 562faa8
Show file tree
Hide file tree
Showing 5 changed files with 1,652 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## phpunit-github-actions-printer

> There's a zero-config way to achieve this at [mheap/phpunit-matcher-action](https://github.com/mheap/phpunit-matcher-action)
This is a PHPUnit printer that uses the `::error` and `::warning` functionality of GitHub Actions to add annotiations for failing test runs. It's main differentiator to the above is that it supports adding warnings in addition to errors.

## Usage

Add this printer to your project

```bash
composer require --dev mheap/phpunit-github-actions-printer
```

When you run your tests, specify `mheap\GithubActionsReporter\Printer` as the printer to use

```bash
./vendor/bin/phpunit --printer mheap\\GithubActionsReporter\\Printer /path/to/tests
```
21 changes: 21 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "mheap/phpunit-github-actions-printer",
"description": "PHPUnit Printer for adding test failures as annotations on GitHub Actions",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Michael Heap",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {
"mheap\\GithubActionsReporter\\": "src"
}
},
"require": {},
"require-dev": {
"phpunit/phpunit": "^8"
}
}
Loading

0 comments on commit 562faa8

Please sign in to comment.