Skip to content

Commit b4e6302

Browse files
committed
Extract phpstan into separate action
1 parent 3990ec7 commit b4e6302

File tree

2 files changed

+31
-7
lines changed

2 files changed

+31
-7
lines changed

.github/workflows/phpstan.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: run-tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
phpstan:
7+
runs-on: ubuntu-latest
8+
name: PHPStan
9+
10+
steps:
11+
- name: Setup PHP
12+
uses: shivammathur/setup-php@v2
13+
with:
14+
php-version: 8.1
15+
coverage: none
16+
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
20+
- name: Cache dependencies
21+
uses: actions/cache@v1
22+
with:
23+
path: ~/.composer/cache/files
24+
key: dependencies-laravel-9.*-php-8.1-composer-${{ hashFiles('composer.json') }}
25+
26+
- name: Install dependencies
27+
run: composer install
28+
29+
- name: Run phpstan
30+
run: composer analyze

.github/workflows/run-tests.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ jobs:
1313
include:
1414
- laravel: 8.*
1515
testbench: ^6.17
16-
larastan: ^1.0
1716
- laravel: 9.*
1817
testbench: ^7.6
19-
larastan: ^2.0
2018
os: [ubuntu-latest]
2119

2220
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
@@ -40,12 +38,8 @@ jobs:
4038

4139
- name: Install dependencies
4240
run: |
43-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nunomaduro/larastan:${{ matrix.larastan }}" --no-interaction --no-update
41+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }} --no-interaction --no-update
4442
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
4543
46-
- name: Run phpstan
47-
if: ${{ matrix.laravel }} == '9.*'
48-
run: composer analyze
49-
5044
- name: Execute tests
5145
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)