File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ ci :
11+ runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ php : [8.1, 8.2]
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+
19+ - name : Setup PHP
20+ uses : shivammathur/setup-php@v3
21+ with :
22+ php-version : ${{ matrix.php }}
23+ extensions : imap, mbstring
24+ coverage : none
25+
26+ - name : Get Composer Cache
27+ uses : actions/cache@v4
28+ with :
29+ path : vendor
30+ key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
31+ restore-keys : |
32+ ${{ runner.os }}-composer-
33+
34+ - name : Install dependencies
35+ run : composer install --prefer-dist --no-progress --no-suggest --no-interaction
36+
37+ - name : Run PHPStan (level 8)
38+ # adjust path or config if needed
39+ run : |
40+ if [ -f phpstan.neon ]; then
41+ ./vendor/bin/phpstan analyse --configuration=phpstan.neon --level=8 src tests || true
42+ else
43+ ./vendor/bin/phpstan analyse --level=8 src tests || true
44+ fi
45+
46+ - name : Run tests
47+ # try PHPUnit first; adjust if you use Pest or other runner
48+ run : |
49+ if [ -x ./vendor/bin/phpunit ]; then
50+ ./vendor/bin/phpunit --configuration phpunit.xml --colors=always --testdox
51+ elif [ -x ./vendor/bin/pest ]; then
52+ ./vendor/bin/pest --min
53+ else
54+ echo "No test runner found (phpunit/pest). Ensure composer install created vendor binaries."
55+ exit 1
56+ fi
You can’t perform that action at this time.
0 commit comments