Skip to content

Commit 2856352

Browse files
authored
Merge pull request #2 from tanhongit/develop
update some config
2 parents 46e7804 + c49d641 commit 2856352

File tree

7 files changed

+66
-19
lines changed

7 files changed

+66
-19
lines changed

.github/workflows/setup_test.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Setup and test
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
tests:
7+
name: Setup and run tests
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Setup PHP
11+
uses: shivammathur/setup-php@v2
12+
with:
13+
php-version: ['8.0', '8.2']
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
- name: Install dependencies
17+
run: |
18+
composer install --no-interaction --no-progress --no-suggest
19+
- name: Run tests
20+
run: |
21+
composer validate --strict

.styleci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
preset: laravel
2+
3+
disabled:
4+
- not_operator_with_successor_space

composer.json

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,7 @@
1616
"telegram-bot-gitlab-notify"
1717
],
1818
"homepage": "https://github.com/lbiltech/laravel-telegram-git-notifier",
19-
"type": "library",
2019
"license": "MIT",
21-
"autoload": {
22-
"psr-4": {
23-
"LbilTech\\LaravelTelegramGitNotifier\\": "src/"
24-
}
25-
},
26-
"autoload-dev": {
27-
"psr-4": {
28-
"LbilTech\\LaravelTelegramGitNotifier\\Tests\\": "tests/"
29-
}
30-
},
3120
"authors": [
3221
{
3322
"name": "Tan Nguyen",
@@ -41,12 +30,23 @@
4130
"role": "Developer"
4231
}
4332
],
33+
"autoload": {
34+
"psr-4": {
35+
"LbilTech\\LaravelTelegramGitNotifier\\": "src/"
36+
}
37+
},
38+
"autoload-dev": {
39+
"psr-4": {
40+
"LbilTech\\LaravelTelegramGitNotifier\\Tests\\": "tests/"
41+
}
42+
},
4443
"require": {
45-
"php": "^8.0"
44+
"php": "^8.0",
45+
"lbiltech/telegram-git-notifier": "^1.0"
4646
},
4747
"require-dev": {
4848
"phpunit/phpunit": "^9.5|^10.0",
49-
"mockery/mockery": "^1.5"
49+
"mockery/mockery": "^1.6"
5050
},
5151
"support": {
5252
"issues": "https://github.com/lbiltech/laravel-telegram-git-notifier/issues"
@@ -58,6 +58,9 @@
5858
]
5959
}
6060
},
61+
"config": {
62+
"sort-packages": true
63+
},
6164
"minimum-stability": "dev",
6265
"prefer-stable": true
63-
}
66+
}

lang/en/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
return [
44

5-
];
5+
];

phpunit.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
bootstrap="vendor/autoload.php"
4+
backupGlobals="false"
5+
colors="true"
6+
processIsolation="false"
7+
stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
8+
cacheDirectory=".phpunit.cache"
9+
backupStaticProperties="false">
10+
<coverage>
11+
<include>
12+
<directory suffix=".php">src/</directory>
13+
</include>
14+
</coverage>
15+
<testsuites>
16+
<testsuite name="LbilTech Laravel Telegram Git Notify">
17+
<directory>tests</directory>
18+
</testsuite>
19+
</testsuites>
20+
</phpunit>

src/Providers/TelegramGitNotifierServiceProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace LbilTech\LaravelTelegramGitNotifier\App\Providers;
3+
namespace LbilTech\LaravelTelegramGitNotifier\Providers;
44

55
use Illuminate\Support\ServiceProvider;
66

@@ -31,7 +31,7 @@ public function boot(): void
3131
$this->loadTranslationsFrom(__DIR__.'/../../lang', 'telegram-git-notifier');
3232

3333
$this->publishes([
34-
__DIR__.'/../../lang' => resource_path('lang/vendor/laravel-generator'),
34+
__DIR__.'/../../lang' => resource_path('lang/vendor/telegram-git-notifier'),
3535
], 'lang');
3636
}
3737

@@ -55,4 +55,4 @@ public function provides(): ?array
5555
{
5656
return ['telegram-git-notifier'];
5757
}
58-
}
58+
}

tests/IntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
|--------------------------------------------------------------------------
55
| Integration
66
|--------------------------------------------------------------------------
7-
*/
7+
*/

0 commit comments

Comments
 (0)