File tree 1 file changed +50
-0
lines changed
1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build
2
+
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+ pull_request :
7
+ branches : [ master ]
8
+
9
+ workflow_dispatch :
10
+
11
+ jobs :
12
+ build :
13
+ runs-on : ubuntu-latest
14
+
15
+ strategy :
16
+ matrix :
17
+ php-versions : ['8.1', '8.2', '8.3']
18
+
19
+ steps :
20
+ - name : Checkout source
21
+ uses : actions/checkout@v2
22
+
23
+ - name : Setup PHP
24
+ uses : shivammathur/setup-php@v2
25
+ with :
26
+ php-version : ${{ matrix.php-versions }}
27
+ ini-values : memory_limit=2048M
28
+
29
+ - name : Get composer cache directory
30
+ id : composer-cache
31
+ run : echo "::set-output name=dir::$(composer config cache-files-dir)"
32
+
33
+ - name : Cache dependencies
34
+ uses : actions/cache@v2
35
+ with :
36
+ path : ${{ steps.composer-cache.outputs.dir }}
37
+ key : ${{ matrix.php-versions }}-composer-${{ hashFiles('**/composer.json') }}
38
+ restore-keys : ${{ matrix.php-versions }}-composer-
39
+
40
+ - name : Install dependencies
41
+ run : composer install --prefer-dist
42
+
43
+ - name : Check code standards
44
+ run : vendor/bin/phpcs --standard=PSR1,PSR2 -n src
45
+
46
+ - name : Run useragent string tests
47
+ run : php bin/runner.php --show check
48
+
49
+ - name : Run unit tests
50
+ run : vendor/bin/phpunit --no-coverage tests/unit
You can’t perform that action at this time.
0 commit comments