File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : PHP Composer
2
+
3
+ on :
4
+ push :
5
+ branches : [ "master" ]
6
+ pull_request :
7
+ branches : [ "master" ]
8
+
9
+ permissions :
10
+ contents : read
11
+
12
+ jobs :
13
+ build :
14
+
15
+ runs-on : ubuntu-latest
16
+
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+
20
+ - name : Validate composer.json and composer.lock
21
+ run : docker compose run composer validate --strict
22
+
23
+ - name : Cache Composer packages
24
+ id : composer-cache
25
+ uses : actions/cache@v3
26
+ with :
27
+ path : vendor
28
+ key : ${{ runner.os }}-php-${{ hashFiles('**/composer.json') }}-${{ github.ref_name }}
29
+ restore-keys : |
30
+ ${{ runner.os }}-php-${{ hashFiles('**/composer.json') }}
31
+ ${{ runner.os }}-php-
32
+
33
+ - name : Install packages
34
+ run : docker compose run composer install
35
+
36
+ - name : Run test suite
37
+ run : docker compose run phpspec
38
+
39
+ - name : Run static analyzer
40
+ run : docker compose run phpstan
41
+
42
+ - name : Run code style checker
43
+ run : docker compose run php-cs-fixer --dry-run
Original file line number Diff line number Diff line change 36
36
},
37
37
"scripts" : {
38
38
"test" : " vendor/bin/phpspec run" ,
39
+ "static-analyzer" : " vendor/bin/phpstan" ,
40
+ "check-style" : " vendor/bin/php-cs-fixer fix --dry-run" ,
39
41
"fix-style" : " vendor/bin/php-cs-fixer fix"
40
42
},
41
43
"repositories" : [
You can’t perform that action at this time.
0 commit comments