Skip to content

Commit a95728b

Browse files
committed
Fix tests running
1 parent 34f7b98 commit a95728b

File tree

7 files changed

+48
-31
lines changed

7 files changed

+48
-31
lines changed

.github/workflows/run-tests.yml

+16-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
runs-on: ${{ matrix.os }}
1616

1717
strategy:
18-
fail-fast: true
18+
fail-fast: false
1919
matrix:
2020
os: [ubuntu-latest, windows-latest]
21-
php: ['8.1', '8.2', '8.3']
21+
php: ['8.1', '8.2', '8.3', '8.4']
2222
laravel: ['9.*', '10.*', '11.*', '12.*']
2323
stability: [prefer-lowest, prefer-stable]
2424
exclude:
@@ -30,6 +30,9 @@ jobs:
3030
php: '8.1'
3131

3232
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
33+
defaults:
34+
run:
35+
shell: bash
3336

3437
steps:
3538
- name: Checkout code
@@ -48,6 +51,17 @@ jobs:
4851
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
4952
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
5053
54+
- name: Get Composer Cache Directory
55+
id: composer-cache
56+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
57+
- name: Cache composer files
58+
uses: actions/cache@v4
59+
with:
60+
path: ${{ steps.composer-cache.outputs.dir }}
61+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.php }}-${{ matrix.laravel }}-${{ matrix.stability }}
62+
restore-keys: |
63+
${{ runner.os }}-composer-
64+
5165
- name: Install dependencies
5266
run: |
5367
composer require "illuminate/contracts:${{ matrix.laravel }}" --no-interaction --no-update

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.idea
22
.phpunit.result.cache
3+
.phpunit.cache
34
build
45
composer.lock
56
coverage

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"require-dev": {
3030
"guzzlehttp/guzzle": "^7.8",
31-
"larastan/larastan": "^2.0.1",
31+
"larastan/larastan": "^2.0|^3.0",
3232
"laravel/pint": "^0.2.2|^1.21",
3333
"nunomaduro/collision": "^6.0|^7.0|^8.0",
3434
"orchestra/testbench": "^7.0|^8.0|^9.0|^10.0",

phpstan.neon.dist

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ includes:
22
- phpstan-baseline.neon
33

44
parameters:
5-
level: 4
65
paths:
76
- src
8-
- config
7+
inferPrivatePropertyTypeFromConstructor: true
8+
level: 4
99
tmpDir: build/phpstan
1010
checkOctaneCompatibility: true
1111
checkModelProperties: true
12-
checkMissingIterableValueType: false
13-

phpunit.xml.dist

+22-24
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,35 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
55
backupGlobals="false"
6-
backupStaticAttributes="false"
76
bootstrap="vendor/autoload.php"
87
colors="true"
9-
convertErrorsToExceptions="true"
10-
convertNoticesToExceptions="true"
11-
convertWarningsToExceptions="true"
128
processIsolation="false"
139
stopOnFailure="false"
1410
executionOrder="random"
1511
failOnWarning="true"
1612
failOnRisky="true"
1713
failOnEmptyTestSuite="true"
1814
beStrictAboutOutputDuringTests="true"
19-
verbose="true"
20-
>
21-
<testsuites>
22-
<testsuite name="Pirsch Test Suite">
23-
<directory>tests</directory>
24-
</testsuite>
25-
</testsuites>
26-
<coverage>
27-
<include>
28-
<directory suffix=".php">./src</directory>
29-
</include>
30-
<report>
31-
<html outputDirectory="build/coverage"/>
32-
<text outputFile="build/coverage.txt"/>
33-
<clover outputFile="build/logs/clover.xml"/>
34-
</report>
35-
</coverage>
36-
<logging>
37-
<junit outputFile="build/report.junit.xml"/>
38-
</logging>
15+
cacheDirectory=".phpunit.cache"
16+
backupStaticProperties="false">
17+
<testsuites>
18+
<testsuite name="Pirsch Test Suite">
19+
<directory>tests</directory>
20+
</testsuite>
21+
</testsuites>
22+
<coverage>
23+
<report>
24+
<html outputDirectory="build/coverage"/>
25+
<text outputFile="build/coverage.txt"/>
26+
<clover outputFile="build/logs/clover.xml"/>
27+
</report>
28+
</coverage>
29+
<logging>
30+
<junit outputFile="build/report.junit.xml"/>
31+
</logging>
32+
<source>
33+
<include>
34+
<directory suffix=".php">./src</directory>
35+
</include>
36+
</source>
3937
</phpunit>

src/Facades/Pirsch.php

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
use Illuminate\Support\Facades\Facade;
66

7+
/**
8+
* @method static void track(?string $name = null, ?array $meta = null)
9+
*
10+
* @see \Pirsch\Pirsch
11+
*/
712
class Pirsch extends Facade
813
{
914
protected static function getFacadeAccessor()

src/Pirsch.php

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public static function track(
4747
],
4848
);
4949
} catch (ConnectionException) {
50+
// remove error
5051
}
5152
});
5253
}

0 commit comments

Comments
 (0)