generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ae58ff
commit a559a0a
Showing
32 changed files
with
268 additions
and
1,544 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Coverage | ||
|
||
on: | ||
push: | ||
paths: | ||
- "**.php" | ||
- ".github/workflows/run-tests-pest.yml" | ||
- "phpunit.xml.dist" | ||
- "composer.json" | ||
- "composer.lock" | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 5 | ||
strategy: | ||
max-parallel: 1 | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest] | ||
php: [8.1] | ||
stability: [prefer-stable] | ||
|
||
name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo | ||
coverage: pcov | ||
|
||
- name: Setup mailpit | ||
run: | | ||
docker run -d \ | ||
--restart unless-stopped \ | ||
--name=mailpit \ | ||
-p 8025:8025 \ | ||
-p 1025:1025 \ | ||
axllent/mailpit | ||
- name: Setup problem matchers | ||
run: | | ||
echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
- name: Install dependencies | ||
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction | ||
|
||
- name: List Installed Dependencies | ||
run: composer show -D | ||
|
||
- name: Create .env | ||
run: | | ||
touch .env | ||
echo NOTIFIER_DISCORD_WEBHOOK=${{ secrets.NOTIFIER_DISCORD_WEBHOOK }} >> .env | ||
echo NOTIFIER_SLACK_WEBHOOK=${{ secrets.NOTIFIER_SLACK_WEBHOOK }} >> .env | ||
echo NOTIFIER_MAIL_MAILER=${{ secrets.NOTIFIER_MAIL_MAILER }} >> .env | ||
echo NOTIFIER_MAIL_HOST=${{ secrets.NOTIFIER_MAIL_HOST }} >> .env | ||
echo NOTIFIER_MAIL_PORT=${{ secrets.NOTIFIER_MAIL_PORT }} >> .env | ||
echo NOTIFIER_MAIL_USERNAME=${{ secrets.NOTIFIER_MAIL_USERNAME }} >> .env | ||
echo NOTIFIER_MAIL_PASSWORD=${{ secrets.NOTIFIER_MAIL_PASSWORD }} >> .env | ||
echo NOTIFIER_MAIL_ENCRYPTION=${{ secrets.NOTIFIER_MAIL_ENCRYPTION }} >> .env | ||
echo NOTIFIER_MAIL_FROM_ADDRESS=${{ secrets.NOTIFIER_MAIL_FROM_ADDRESS }} >> .env | ||
echo NOTIFIER_MAIL_TO_ADDRESS=${{ secrets.NOTIFIER_MAIL_TO_ADDRESS }} >> .env | ||
echo NOTIFIER_REQUEST=${{ secrets.NOTIFIER_REQUEST }} >> .env | ||
echo NOTIFIER_MOCK=false >> .env | ||
- name: Execute tests | ||
run: vendor/bin/pest --coverage | ||
|
||
- name: Send code coverage | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
verbose: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
<?php | ||
|
||
namespace Kiwilan\Notifier\Facades; | ||
namespace Kiwilan\LaravelNotifier\Facades; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
/** | ||
* @see \Kiwilan\Notifier\Journal | ||
* @see \Kiwilan\LaravelNotifier\Journal | ||
* | ||
* @method static \Kiwilan\Notifier\Journal info(string $message, array|string $data = []) | ||
* @method static \Kiwilan\Notifier\Journal debug(string $message, array|string $data = []) | ||
* @method static \Kiwilan\Notifier\Journal warning(string $message, array|string $data = []) | ||
* @method static \Kiwilan\Notifier\Journal error(string $message, array|string $data = []) | ||
* @method static \Kiwilan\Notifier\Journal handler(\Throwable $e, bool $toDatabase = false, ?string $toNotifier = null) | ||
* @method static \Kiwilan\LaravelNotifier\Journal info(string $message, array|string $data = []) | ||
* @method static \Kiwilan\LaravelNotifier\Journal debug(string $message, array|string $data = []) | ||
* @method static \Kiwilan\LaravelNotifier\Journal warning(string $message, array|string $data = []) | ||
* @method static \Kiwilan\LaravelNotifier\Journal error(string $message, array|string $data = []) | ||
* @method static \Kiwilan\LaravelNotifier\Journal handler(\Throwable $e, bool $toDatabase = false, ?string $toNotifier = null) | ||
*/ | ||
class Journal extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Kiwilan\Notifier\Journal::class; | ||
return \Kiwilan\LaravelNotifier\Journal::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
<?php | ||
|
||
namespace Kiwilan\Notifier\Facades; | ||
namespace Kiwilan\LaravelNotifier\Facades; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
/** | ||
* @see \Kiwilan\Notifier\Notifier | ||
* | ||
* @method static \Kiwilan\Notifier\Notifier\NotifierMail mail() | ||
* @method static \Kiwilan\Notifier\Notifier\NotifierSlack slack(?string $webhook = null) | ||
* @method static \Kiwilan\Notifier\Notifier\NotifierDiscord discord(?string $webhook = null) | ||
* @method static \Kiwilan\Notifier\NotifierMail mail() | ||
* @method static \Kiwilan\Notifier\NotifierSlack slack(?string $webhook = null, string $client = 'stream') | ||
* @method static \Kiwilan\Notifier\NotifierDiscord discord(?string $webhook = null, string $client = 'stream') | ||
* @method static \Kiwilan\Notifier\NotifierHttp http(?string $url = null, string $client = 'stream') | ||
*/ | ||
class Notifier extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Kiwilan\Notifier\Notifier::class; | ||
return \Kiwilan\LaravelNotifier\Notifier::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/NotifierServiceProvider.php → src/LaravelNotifierServiceProvider.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.