File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file 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, dev ]
6
+ pull_request :
7
+ branches : [ master, dev ]
8
+
9
+ jobs :
10
+ build :
11
+
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - uses : actions/checkout@v2
16
+
17
+ # Setup PHP versions, run checks
18
+ - name : PHP setup
19
+ uses : shivammathur/setup-php@v2
20
+ with :
21
+ php-version : 8
22
+
23
+ - name : Validate composer.json and composer.lock
24
+ run : composer validate
25
+
26
+ - name : Cache Composer packages
27
+ id : composer-cache
28
+ uses : actions/cache@v2
29
+ with :
30
+ path : vendor
31
+ key : ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
32
+ restore-keys : |
33
+ ${{ runner.os }}-php-
34
+ - name : Install dependencies
35
+ if : steps.composer-cache.outputs.cache-hit != 'true'
36
+ run : composer install --prefer-dist --no-progress --no-suggest
37
+
38
+ - name : Run test
39
+ run : composer run-script phpunit
40
+
41
+ - name : Run phpstan
42
+ run : composer run-script phpstan
43
+
44
+ - name : Check codestyle
45
+ run : composer run-script phpcs
You can’t perform that action at this time.
0 commit comments