Skip to content

Commit 7712942

Browse files
Merge pull request #43 from robersonfaria/config-tests
Package configuration to use automated tests
2 parents 7e22677 + 332897e commit 7712942

33 files changed

+6593
-56
lines changed

.github/workflows/phpcs.yml renamed to .github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- "**.php"
77
- "phpcs.xml"
88
- ".github/workflows/phpcs.yml"
9+
push:
910

1011
jobs:
1112
phpcs:
@@ -27,3 +28,14 @@ jobs:
2728
files: "**.php" # you may customize glob as needed
2829
phpcs_path: php phpcs.phar
2930
standard: phpcs.xml
31+
32+
build-test:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
- uses: php-actions/composer@v5 # or alternative dependency management
37+
- uses: php-actions/phpunit@v3
38+
with:
39+
bootstrap: vendor/autoload.php
40+
configuration: phpunit.xml
41+
args: --coverage-text

composer.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@
44
"keywords": ["laravel", "schedule", "task", "jobs"],
55
"license": "MIT",
66
"require": {
7-
"php": "^7.0|^8.0",
8-
"laravel/framework": "6.*|7.*|8.*"
7+
"php": "^7.2|^8.0",
8+
"laravel/framework": "^5.8|6.*|7.*|8.*"
9+
},
10+
"require-dev": {
11+
"phpunit/phpunit": "^8.5",
12+
"orchestra/testbench": "^5.20",
13+
"squizlabs/php_codesniffer": "^3.6"
914
},
1015
"authors": [
1116
{
@@ -18,13 +23,22 @@
1823
"RobersonFaria\\DatabaseSchedule\\": "src/"
1924
}
2025
},
26+
"autoload-dev": {
27+
"psr-4": {
28+
"RobersonFaria\\DatabaseSchedule\\Tests\\": "tests/"
29+
}
30+
},
2131
"extra": {
2232
"laravel": {
2333
"providers": [
2434
"RobersonFaria\\DatabaseSchedule\\DatabaseSchedulingServiceProvider"
2535
]
2636
}
2737
},
38+
"scripts": {
39+
"phpcs": "./vendor/bin/phpcs .",
40+
"tests": "./vendor/bin/phpunit ./tests"
41+
},
2842
"minimum-stability": "dev",
2943
"prefer-stable": true
3044
}

0 commit comments

Comments
 (0)