Skip to content

Commit 8221f3a

Browse files
committed
Updating docs
1 parent ab59248 commit 8221f3a

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

docs/lessons/2_ci_cd.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
1. How to install PHPStan
1010

1111
```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
1414
```
1515

1616
2. How to configure PHPStan
@@ -59,13 +59,18 @@ touch .github/workflows/main.yml
5959
6. Create pipeline for main and develop
6060

6161
```bash
62-
name: Build and Deploy
62+
name: Build, test and deploy
6363

6464
on:
6565
push:
6666
branches: [ main ]
6767
```
6868

69+
8. Add APP_KEY to env.example
70+
```bash
71+
APP_KEY=base64:d9a9xJWd3Zn6aBuApVpYTrtGZwyfIC+EErLA7zNh1vg=
72+
```
73+
6974
7. Create build job
7075
```bash
7176
jobs:
@@ -80,14 +85,23 @@ jobs:
8085
with:
8186
php-version: 8.3
8287

88+
- name: Create database
89+
run: touch ./database/database.sqlite
90+
91+
- name: Copy .env
92+
run: cp .env.test .env
93+
8394
- name: Install app
8495
run: composer install
8596

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
88102

89-
- name: Test PHPUnit
90-
run: ./vendor/bin/phpunit
103+
- name: Test PHPUnit
104+
run: ./vendor/bin/phpunit
91105

92106

93107

0 commit comments

Comments
 (0)