Skip to content

Commit 74fcab9

Browse files
committed
Add PHPStan to CI tests and optimize workflow.
1 parent 61e43c7 commit 74fcab9

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

.github/workflows/test.yaml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,60 @@ on:
55
branches:
66
- main
77
pull_request:
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
811
jobs:
912
pint:
1013
name: Pint
1114
runs-on: ubuntu-latest
1215
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
1318
- name: Prepare PHP
1419
id: setup-php
1520
uses: shivammathur/setup-php@v2
1621
with:
1722
php-version: 8.4
1823
tools: composer:v2
19-
- name: Checkout
20-
uses: actions/checkout@v4
24+
cache: composer
2125
- name: Install Composer dependencies
22-
run: composer install --no-interaction --no-ansi --no-progress
26+
run: composer install --no-interaction --no-ansi --no-progress --prefer-dist
2327
- name: Run Pint
2428
run: ./vendor/bin/pint --test
25-
pest:
26-
name: Pest
29+
phpstan:
30+
name: PHPStan
2731
needs: pint
2832
runs-on: ubuntu-latest
2933
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
3036
- name: Prepare PHP
3137
id: setup-php
3238
uses: shivammathur/setup-php@v2
3339
with:
3440
php-version: 8.4
3541
tools: composer:v2
42+
cache: composer
43+
- name: Install Composer dependencies
44+
run: composer install --no-interaction --no-ansi --no-progress --prefer-dist
45+
- name: Run PHPStan
46+
run: ./vendor/bin/phpstan analyse --no-progress
47+
pest:
48+
name: Pest
49+
needs: pint
50+
runs-on: ubuntu-latest
51+
steps:
3652
- name: Checkout
3753
uses: actions/checkout@v4
54+
- name: Prepare PHP
55+
id: setup-php
56+
uses: shivammathur/setup-php@v2
57+
with:
58+
php-version: 8.4
59+
tools: composer:v2
60+
cache: composer
3861
- name: Install Composer dependencies
39-
run: composer install --no-interaction --no-ansi --no-progress
62+
run: composer install --no-interaction --no-ansi --no-progress --prefer-dist
4063
- name: Run tests
4164
run: ./vendor/bin/pest

0 commit comments

Comments
 (0)