File tree Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Original file line number Diff line number Diff line change 9
9
1 . How to install PHPStan
10
10
11
11
``` bash
12
- composer require phpstan/phpstan --dev
13
- composer require nunomaduro /larastan:^2.0 --dev
12
+ composer require phpstan/phpstan --dev
13
+ composer require larastan /larastan --dev
14
14
```
15
15
16
16
2 . How to configure PHPStan
@@ -59,13 +59,18 @@ touch .github/workflows/main.yml
59
59
6 . Create pipeline for main and develop
60
60
61
61
``` bash
62
- name: Build and Deploy
62
+ name: Build, test and deploy
63
63
64
64
on:
65
65
push:
66
66
branches: [ main ]
67
67
```
68
68
69
+ 8 . Add APP_KEY to env.example
70
+ ``` bash
71
+ APP_KEY=base64:d9a9xJWd3Zn6aBuApVpYTrtGZwyfIC+EErLA7zNh1vg=
72
+ ```
73
+
69
74
7 . Create build job
70
75
``` bash
71
76
jobs:
@@ -80,14 +85,23 @@ jobs:
80
85
with:
81
86
php-version: 8.3
82
87
88
+ - name: Create database
89
+ run: touch ./database/database.sqlite
90
+
91
+ - name: Copy .env
92
+ run: cp .env.test .env
93
+
83
94
- name: Install app
84
95
run: composer install
85
96
86
- - name: Test PHPUnit
87
- run: ./vendor/bin/phpstan analyse
97
+ - name: Run migrations
98
+ run: php artisan migrate
99
+
100
+ - name: Test PHPStan
101
+ run: ./vendor/bin/phpstan analyse
88
102
89
- - name: Test PHPUnit
90
- run: ./vendor/bin/phpunit
103
+ - name: Test PHPUnit
104
+ run: ./vendor/bin/phpunit
91
105
92
106
93
107
You can’t perform that action at this time.
0 commit comments