Skip to content

Commit e59839f

Browse files
Merge pull request #46 from kevincobain2000/feature/cover
(fix) README - travis and scrutinizer badges are obsolete
2 parents 980efff + 160675e commit e59839f

File tree

3 files changed

+51
-63
lines changed

3 files changed

+51
-63
lines changed

.github/workflows/coding-standards.yml

-41
This file was deleted.

.github/workflows/code-coverage.yml renamed to .github/workflows/coveritup.yml

+27-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Code Coverage
1+
name: Coveritup
22

3-
on: [fork, pull_request, push, workflow_dispatch]
3+
on: [fork, pull_request, push]
44

55
jobs:
6-
code-coverage:
7-
name: Code Coverage
6+
Coveritup:
7+
name: Coveritup
88

99
runs-on: ubuntu-latest
1010

@@ -23,6 +23,7 @@ jobs:
2323
extensions: intl
2424
ini-values: memory_limit=-1
2525
php-version: ${{ matrix.php-version }}
26+
- run: curl -sLk https://raw.githubusercontent.com/kevincobain2000/cover-totalizer/master/install.sh | sh
2627

2728
- name: Determine composer cache directory
2829
id: determine-composer-cache-directory
@@ -35,11 +36,27 @@ jobs:
3536
key: php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
3637
restore-keys: php-${{ matrix.php-version }}-composer-
3738

38-
- name: Install dependencies with composer
39-
run: composer install --no-interaction --no-progress --no-suggest
40-
41-
- name: Create build directory
42-
run: mkdir -p .build/logs
39+
- uses: kevincobain2000/action-coveritup@v2
40+
with:
41+
type: composer-install-time
42+
command: composer install --no-interaction --no-progress --no-suggest
43+
record: runtime
4344

4445
- name: Collect code coverage with Xdebug and phpunit/phpunit
45-
run: vendor/bin/phpunit --coverage-clover=.build/logs/clover.xml
46+
run: vendor/bin/phpunit --coverage-clover=coverage.xml
47+
- uses: kevincobain2000/action-coveritup@v2
48+
with:
49+
type: coverage
50+
command: ./cover-totalizer coverage.xml
51+
52+
- uses: kevincobain2000/action-coveritup@v2
53+
with:
54+
type: composer-dependencies
55+
command: composer show -i --name-only 2>/dev/null | wc -l | awk '{print $NF}'
56+
57+
- name: "PHPCS"
58+
run: vendor/bin/phpcs --ignore=views --standard=PSR2 src
59+
60+
- uses: kevincobain2000/action-coveritup@v2
61+
with:
62+
pr_comment: true

README.md

+24-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
1-
## Laravel Alert Notifications
1+
2+
<h1 align="center">
3+
Laravel Alert Notifcations
4+
</h1>
5+
<p align="center">
6+
Send php exceptions to email, microsoft teams, slack.
7+
<br/>
8+
Notifications are throttle enabled so devs don't get a lot of emails from one host
9+
<br/>
10+
(or all hosts if cache driver is shared).
11+
</p>
12+
13+
214
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
315
[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)
416
<!-- ALL-CONTRIBUTORS-BADGE:END -->
517

6-
<a href="https://travis-ci.org/kevincobain2000/laravel-alert-notifications"><img src="https://travis-ci.org/kevincobain2000/laravel-alert-notifications.svg?branch=master" alt="Travis Build Status"></a>
7-
<a href="https://scrutinizer-ci.com/g/kevincobain2000/laravel-alert-notifications"><img src="https://scrutinizer-ci.com/g/kevincobain2000/laravel-alert-notifications/badges/quality-score.png?b=master" alt="Quality Score"></a>
8-
<a href="https://scrutinizer-ci.com/g/kevincobain2000/laravel-alert-notifications"><img src="https://scrutinizer-ci.com/g/kevincobain2000/laravel-alert-notifications/badges/build.png?b=master" alt="Build Status"></a>
9-
<a href="https://scrutinizer-ci.com/g/kevincobain2000/laravel-alert-notifications"><img src="https://scrutinizer-ci.com/g/kevincobain2000/laravel-alert-notifications/badges/coverage.png?b=master" alt="Coverage Status"></a>
18+
![composer-install-time](https://coveritup.app/badge?org=kevincobain2000&repo=laravel-alert-notifications&type=composer-install-time&branch=master)
19+
![coverage](https://coveritup.app/badge?org=kevincobain2000&repo=laravel-alert-notifications&type=coverage&branch=master)
20+
![composer-dependencies](https://coveritup.app/badge?org=kevincobain2000&repo=laravel-alert-notifications&type=composer-dependencies&branch=master)
21+
22+
![composer-install-time](https://coveritup.app/chart?org=kevincobain2000&repo=laravel-alert-notifications&type=composer-install-time&output=svg&width=160&height=160&branch=master)
23+
![coverage](https://coveritup.app/chart?org=kevincobain2000&repo=laravel-alert-notifications&type=coverage&output=svg&width=160&height=160&branch=master)
24+
![composer-dependencies](https://coveritup.app/chart?org=kevincobain2000&repo=laravel-alert-notifications&type=composer-dependencies&output=svg&width=160&height=160&branch=master)
1025

11-
Send php exceptions to email, microsoft teams, slack.
12-
Notifications are throttle enabled so devs don't get a lot of emails from one host (or all hosts if cache driver is shared)
13-
Please check config for more details on throttling.
1426

1527
| Channels | Progress |
1628
| :------- | :--------- |
@@ -82,15 +94,15 @@ ALERT_NOTIFICATION_CURL_PROXY=
8294
### Usage
8395

8496
```php
85-
new AlertDispatcher(
86-
Exception $e
97+
new AlertDispatcher(
98+
Exception $e
8799
[, array $dontAlertExceptions = []] // Exceptions that shouldn't trigger notifications
88100
[, array $notificationLevelsMapping = []] // [Exception class => Notification level] mapping
89101
[, array $exceptionContext = []] // Array of context data
90102
)
91103
```
92104

93-
In **app/Exceptions/Handler.php**. It is better to use a try catch to prevent loop.
105+
In **app/Exceptions/Handler.php**. It is better to use a try catch to prevent loop.
94106

95107
```php
96108
use Kevincobain2000\LaravelAlertNotifications\Dispatcher\AlertDispatcher;
@@ -145,7 +157,7 @@ class Handler extends ExceptionHandler
145157
| | ``%ExceptionLevel%`` => ``current notification level`` |
146158
| | ex. ``'subject' => 'Exception [%ExceptionType%] has ocurred``' | |
147159
| mail.#level# | Configs for each notification level |
148-
| | notification levels refer to those defined in ``\Psr\Log\LogLevel`` |
160+
| | notification levels refer to those defined in ``\Psr\Log\LogLevel`` |
149161
| mail.#level#.toAddress | (default mail.to_address), #level# notification recipient e-mail |
150162
| mail.#level#.subject | #level# notification e-mail subject |
151163
| microsoft_teams.enabled | (default true), false will not notify to teams |

0 commit comments

Comments
 (0)