File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public function __construct(
2121 #[DaggerFunction]
2222 public function lintCheck (): Container
2323 {
24- return ( new Base () )
24+ return new Base ()
2525 ->withVendor (
2626 $ this ->src ->file ('composer.json ' ),
2727 $ this ->src ->file ('composer.lock ' ),
@@ -42,7 +42,7 @@ public function test(
4242 string $ suite = 'default ' ,
4343 ): Container {
4444 // Take advantage of Dagger's caching by using the same base for service and container
45- $ base = ( new Base () )
45+ $ base = new Base ()
4646 ->withPdo ()
4747 ->withPcov ()
4848 ->withNginx ($ this ->src ->file ('docker/nginx.conf ' ))
@@ -56,4 +56,19 @@ public function test(
5656 ->withServiceBinding ('mockserver ' , $ service )
5757 ->withExec (['./vendor/bin/phpunit ' , "--testsuite= $ suite " ]);
5858 }
59+
60+ #[DaggerFunction]
61+ public function analyze (): Container
62+ {
63+ return new Base ()
64+ ->withVendor (
65+ $ this ->src ->file ('composer.json ' ),
66+ $ this ->src ->file ('composer.lock ' ),
67+ )
68+ ->asContainer ()
69+ ->withExec ([
70+ './vendor/bin/phpstan ' ,
71+ 'analyze ' ,
72+ ]);
73+ }
5974}
Original file line number Diff line number Diff line change 1- name : Run Tests
1+ name : Checks
22
33on :
44 push
1515 with :
1616 fetch-depth : 0
1717
18- - name : Dagger Run Tests
18+ - name : PHPUnit
1919 uses : dagger/dagger-for-github@v5
2020 with :
2121 version : " 0.19.6"
2222 verb : call
2323 args : dev test
24+
25+ - name : PHP CS Fixer
26+ uses : dagger/dagger-for-github@v5
27+ with :
28+ version : " 0.19.6"
29+ verb : call
30+ args : dev lintCheck
31+
32+ - name : PHPStan
33+ uses : dagger/dagger-for-github@v5
34+ with :
35+ version : " 0.19.6"
36+ verb : call
37+ args : dev analyze
You can’t perform that action at this time.
0 commit comments