File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Test
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ branches :
9
+ - main
10
+ workflow_dispatch :
11
+
12
+ jobs :
13
+ build :
14
+ name : Build & Test
15
+ runs-on : ubuntu-latest
16
+
17
+ steps :
18
+ - name : Clone project
19
+ uses : actions/checkout@v4
20
+
21
+ - name : Setup PHP
22
+ uses : shivammathur/setup-php@v2
23
+ with :
24
+ php-version : 8.3
25
+ coverage : none
26
+ extensions : pcre
27
+ tools : composer:v2
28
+
29
+ - name : Validate manifest file
30
+ run : composer validate --strict
31
+
32
+ - name : Cache dependencies
33
+ uses : actions/cache@v4
34
+ with :
35
+ path : vendor
36
+ key : ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
37
+ restore-keys : ${{ runner.os }}-composer-
38
+
39
+ - name : Install dependencies
40
+ run : composer install --no-interaction --no-progress
41
+
42
+ - name : Lint project files
43
+ run : |
44
+ set -e # Stop on error.
45
+ find . -path ./vendor -prune -o -name "*.php" -print0 | xargs -0 -n 1 php -l
46
+
47
+ - name : Lint codes
48
+ run : composer lint
49
+
50
+ - name : Check coding convention
51
+ run : composer check
52
+
53
+ - name : Security check
54
+ run : composer audit
55
+
56
+ - name : Run tests
57
+ run : composer test
You can’t perform that action at this time.
0 commit comments