Skip to content

Commit 0989b3b

Browse files
committed
updated github actions
1 parent 831bb00 commit 0989b3b

File tree

4 files changed

+83
-7
lines changed

4 files changed

+83
-7
lines changed

.github/workflows/lint.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Fix Code Style
2+
3+
on: [push]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
php: [8.4]
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup PHP
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: ${{ matrix.php }}
21+
extensions: json, dom, curl, libxml, mbstring
22+
coverage: none
23+
24+
- name: Install Pint
25+
run: composer global require laravel/pint
26+
27+
- name: Run Pint
28+
run: pint
29+
30+
- name: Commit linted files
31+
uses: stefanzweifel/git-auto-commit-action@v5

.github/workflows/phpstan.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: PHPStan
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
phpstan:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Setup PHP
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: '8.4'
18+
coverage: none
19+
tools: composer
20+
21+
- name: Get Composer cache directory
22+
id: composer-cache
23+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
24+
25+
- name: Setup cache
26+
uses: actions/cache@v4
27+
with:
28+
path: ${{ steps.composer-cache.outputs.dir }}
29+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
30+
restore-keys: ${{ runner.os }}-composer-
31+
32+
- name: Install dependencies
33+
run:
34+
composer install --prefer-dist --no-suggest --no-progress
35+
36+
- name: Run PHPStan
37+
run: ./vendor/bin/phpstan analyse

.github/workflows/run_tests.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ jobs:
99
fail-fast: true
1010
matrix:
1111
os: [ubuntu-latest]
12-
php: [7.4, 8.0]
13-
laravel: [8.*, 7.*]
12+
php: [8.3, 8.4]
13+
laravel: [11.*]
1414
dependency-version: [prefer-lowest, prefer-stable]
1515
include:
16-
- laravel: 8.*
17-
testbench: 6.*
18-
- laravel: 7.*
19-
testbench: 5.*
16+
- laravel: 11.*
17+
testbench: 9.*
2018

2119
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
2220

@@ -28,7 +26,7 @@ jobs:
2826
uses: shivammathur/setup-php@v2
2927
with:
3028
php-version: ${{ matrix.php }}
31-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
29+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
3230
coverage: none
3331

3432
- name: Install dependencies

phpstan.neon

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
parameters:
2+
3+
paths:
4+
- src
5+
6+
# The level 9 is the highest level
7+
level: 5
8+
9+
universalObjectCratesClasses:
10+
- Illuminate\Http\Resources\Json\JsonResource

0 commit comments

Comments
 (0)