Skip to content

Commit 0519f6a

Browse files
committed
2 parents 154caf2 + 4f68aba commit 0519f6a

File tree

6 files changed

+121
-34
lines changed

6 files changed

+121
-34
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ trim_trailing_whitespace = true
1313

1414
[*.md]
1515
trim_trailing_whitespace = false
16+
17+
[*.{yml,yaml}]
18+
indent_size = 2

.github/workflows/test.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
tests:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
fail-fast: true
12+
matrix:
13+
os: [ubuntu-latest]
14+
php: ['8.0', 8.1, 8.2, 8.3]
15+
laravel: [9.*, 10.*, 11.*]
16+
dependency-version: [prefer-lowest, prefer-stable]
17+
exclude:
18+
- laravel: 9.*
19+
php: 8.1
20+
- laravel: 9.*
21+
php: 8.2
22+
- laravel: 9.*
23+
php: 8.3
24+
- laravel: 10.*
25+
php: '8.0'
26+
- laravel: 11.*
27+
php: '8.0'
28+
- laravel: 11.*
29+
php: 8.1
30+
31+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
32+
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v4
36+
37+
- name: Setup PHP
38+
uses: shivammathur/setup-php@v2
39+
with:
40+
php-version: ${{ matrix.php }}
41+
extensions: dom, curl, libxml, mbstring, zip
42+
tools: composer:v2
43+
coverage: none
44+
45+
- name: Install dependencies
46+
run: |
47+
composer require "illuminate/console:${{ matrix.laravel }}" "illuminate/mail:${{ matrix.laravel }}" "illuminate/view:${{ matrix.laravel }}" --no-interaction --no-update
48+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-progress
49+
- name: Execute tests
50+
run: vendor/bin/pest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ docs
44
vendor
55
coverage
66
.phpunit.result.cache
7+
.phpunit.cache
78
.idea
89
.editorconfig

.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
language: php
2+
3+
php:
4+
- 7.3
5+
- 7.4
6+
- 8.0
7+
- 8.1
8+
- 8.2
9+
10+
env:
11+
matrix:
12+
- COMPOSER_FLAGS="--prefer-lowest"
13+
- COMPOSER_FLAGS=""
14+
15+
before_script:
16+
- travis_retry composer self-update
17+
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source
18+
19+
script:
20+
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
21+
22+
after_script:
23+
- php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover

composer.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
22
"name": "beyondcode/helo-laravel",
33
"description": "HELO Laravel debug helper",
4+
"license": "MIT",
45
"keywords": [
56
"beyondcode",
67
"HELO"
78
],
8-
"homepage": "https://github.com/beyondcode/helo-laravel",
9-
"license": "MIT",
109
"authors": [
1110
{
1211
"name": "Marcel Pociot",
@@ -15,17 +14,18 @@
1514
"role": "Developer"
1615
}
1716
],
17+
"homepage": "https://github.com/beyondcode/helo-laravel",
1818
"require": {
19-
"php": "^7.3|^8.0",
20-
"illuminate/view": "^6.0|^7.0|^8.0|^9.0|^10.0",
21-
"illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0",
22-
"illuminate/mail": "^6.0|^7.0|^8.0|^9.0|^10.0"
19+
"php": "^8.0 || ^8.1 || ^8.2",
20+
"illuminate/console": "^9.0 || ^10.0 || ^11.0",
21+
"illuminate/mail": "^9.0 || ^10.0 || ^11.0",
22+
"illuminate/view": "^9.0 || ^10.0 || ^11.0"
2323
},
2424
"require-dev": {
25-
"orchestra/testbench": "^5.1|^6.3|^7.0|^8.0",
26-
"pestphp/pest": "1.x-dev",
27-
"phpunit/phpunit": "^8.0|^9.0"
25+
"orchestra/testbench": "^7.0 || ^8.0 || ^9.0",
26+
"pestphp/pest": "1.x-dev || 2.x-dev"
2827
},
28+
"minimum-stability": "dev",
2929
"autoload": {
3030
"psr-4": {
3131
"BeyondCode\\HeloLaravel\\": "src"
@@ -36,22 +36,24 @@
3636
"BeyondCode\\HeloLaravel\\Tests\\": "tests"
3737
}
3838
},
39-
"scripts": {
40-
"test": "vendor/bin/phpunit",
41-
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
42-
},
4339
"config": {
44-
"sort-packages": true,
4540
"allow-plugins": {
4641
"pestphp/pest-plugin": true
47-
}
42+
},
43+
"sort-packages": true
4844
},
49-
"minimum-stability": "dev",
5045
"extra": {
46+
"branch-alias": {
47+
"dev-master": "11.x-dev"
48+
},
5149
"laravel": {
5250
"providers": [
5351
"BeyondCode\\HeloLaravel\\HeloLaravelServiceProvider"
5452
]
5553
}
54+
},
55+
"scripts": {
56+
"test": "vendor/bin/pest",
57+
"test-coverage": "vendor/bin/pest --coverage-html coverage"
5658
}
5759
}

phpunit.xml.dist

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,37 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="vendor/autoload.php"
3-
backupGlobals="false"
4-
backupStaticAttributes="false"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
cacheDirectory=".phpunit.cache"
6+
executionOrder="depends,defects"
7+
beStrictAboutCoverageMetadata="true"
8+
beStrictAboutOutputDuringTests="true"
59
colors="true"
6-
verbose="true"
7-
convertErrorsToExceptions="true"
8-
convertNoticesToExceptions="true"
9-
convertWarningsToExceptions="true"
10-
processIsolation="false"
10+
backupGlobals="false"
11+
backupStaticProperties="false"
12+
stopOnError="false"
1113
stopOnFailure="false">
1214
<testsuites>
1315
<testsuite name="BeyondCode Test Suite">
1416
<directory>tests</directory>
1517
</testsuite>
1618
</testsuites>
17-
<filter>
18-
<whitelist>
19-
<directory suffix=".php">src/</directory>
20-
</whitelist>
21-
</filter>
19+
20+
<source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true">
21+
<include>
22+
<directory>src</directory>
23+
</include>
24+
</source>
25+
2226
<logging>
23-
<log type="tap" target="build/report.tap"/>
24-
<log type="junit" target="build/report.junit.xml"/>
25-
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
26-
<log type="coverage-text" target="build/coverage.txt"/>
27-
<log type="coverage-clover" target="build/logs/clover.xml"/>
27+
<junit outputFile="build/report.junit.xml"/>
2828
</logging>
29+
30+
<coverage>
31+
<report>
32+
<html outputDirectory="build/html-coverage" />
33+
<text outputFile="build/coverage.txt" />
34+
<clover outputFile="build/clover.xml" />
35+
</report>
36+
</coverage>
2937
</phpunit>

0 commit comments

Comments
 (0)