Skip to content

Commit 7255d7d

Browse files
committed
chore: workflows
1 parent 973b39d commit 7255d7d

File tree

2 files changed

+37
-56
lines changed

2 files changed

+37
-56
lines changed

.github/workflows/formats.yml

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,24 @@
11
name: Formats
22

3-
on: ['push', 'pull_request']
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
47

58
jobs:
6-
ci:
7-
runs-on: ${{ matrix.os }}
8-
9-
strategy:
10-
fail-fast: true
11-
matrix:
12-
os: [ubuntu-latest]
13-
php: [8.3]
14-
dependency-version: [prefer-stable]
15-
16-
name: Formats P${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
9+
php-code-styling:
10+
runs-on: ubuntu-latest
1711

1812
steps:
19-
- uses: actions/checkout@v2
13+
- name: Checkout code
14+
uses: actions/checkout@v4
2015
with:
2116
ref: ${{ github.head_ref }}
2217

23-
- name: Cache dependencies
24-
uses: actions/cache@v1
25-
with:
26-
path: ~/.composer/cache/files
27-
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
28-
29-
- name: Setup PHP
30-
uses: shivammathur/setup-php@v2
31-
with:
32-
php-version: 8.3
33-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick
34-
coverage: none
35-
36-
- name: Install Composer dependencies
37-
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist
38-
39-
- name: Run Pint
40-
run: ./vendor/bin/pint
18+
- name: Fix PHP code style issues
19+
uses: aglipanci/laravel-pint-action@v2
4120

42-
- uses: stefanzweifel/git-auto-commit-action@v4
21+
- name: Commit changes
22+
uses: stefanzweifel/git-auto-commit-action@v5
4323
with:
44-
commit_message: Apply style changes
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
commit_message: Fix styling

.github/workflows/tests.yml

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,47 @@
1-
name: Tests
1+
name: "Tests"
22

3-
on: [ push, pull_request ]
3+
on: [push, pull_request]
44

55
jobs:
66
test:
7-
runs-on: ${{ matrix.os }}
7+
8+
runs-on: ubuntu-latest
89
strategy:
9-
fail-fast: true
10+
fail-fast: false
1011
matrix:
11-
os: [ ubuntu-latest ]
12-
php: [ 8.2, 8.3 ]
13-
laravel: [ 10.* ]
14-
dependency-version: [ prefer-lowest, prefer-stable ]
12+
php: [8.4, 8.3, 8.2]
13+
laravel: ["^12.0", "^11.0", "^10.0"]
14+
dependency-version: [prefer-lowest, prefer-stable]
1515
include:
16-
- laravel: 10.*
16+
- laravel: "^12.0"
17+
testbench: 10.*
18+
- laravel: "^11.0"
19+
testbench: 9.*
20+
- laravel: "^10.0"
1721
testbench: 8.*
22+
exclude:
23+
- laravel: "^8.12"
24+
php: 8.3
25+
- laravel: "^8.12"
26+
php: 8.4
1827

19-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
28+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
2029

2130
steps:
2231
- name: Checkout code
23-
uses: actions/checkout@v2
24-
25-
- name: Cache dependencies
26-
uses: actions/cache@v2
27-
with:
28-
path: ~/.composer/cache/files
29-
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
32+
uses: actions/checkout@v4
3033

3134
- name: Setup PHP
3235
uses: shivammathur/setup-php@v2
3336
with:
3437
php-version: ${{ matrix.php }}
35-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
38+
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
3639
coverage: none
3740

3841
- name: Install dependencies
3942
run: |
40-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
41-
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
43+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" "nesbot/carbon:>=2.72.6" --no-interaction --no-update
44+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
4245
4346
- name: Execute tests
44-
run: vendor/bin/pest -v
47+
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)