4
4
build :
5
5
name : Github CI - Branch
6
6
runs-on : ubuntu-latest
7
+ environment : github-ci
7
8
steps :
8
- - name : Setup PHP 7.3
9
+ - name : Setup PHP 8.0
9
10
uses : shivammathur/setup-php@v2
10
11
with :
11
- php-version : ' 7.3 '
12
+ php-version : ' 8.0 '
12
13
coverage : none
13
- extensions : mbstring, intl, pdo_sqlite
14
+ extensions : mbstring, intl, pdo_sqlite, json, redis, grpc
14
15
ini-values : apc.enabled=1, apc.shm_size=32M, apc.ttl=7200, apc.enable_cli=1, apc.serializer=php
16
+
15
17
- name : Setup Memcached server
16
18
uses : niden/actions-memcached@v7
17
19
- name : Setup Redis server
@@ -23,32 +25,28 @@ jobs:
23
25
- name : Validate composer.json and composer.lock
24
26
run : composer validate
25
27
28
+ - name : Setup GCP environment
29
+ run : " ./bin/ci/scripts/setup_gcp.sh || echo \" GCP setup failed (maybe due to fork limitation)\" "
30
+ env :
31
+ BASE64_GOOGLE_APPLICATION_CREDENTIALS : ${{ secrets.BASE64_GOOGLE_APPLICATION_CREDENTIALS }}
32
+ GOOGLE_APPLICATION_CREDENTIALS : ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
33
+
26
34
- name : Install dependencies
27
- run : composer install --prefer-dist --no-progress --no-suggest
35
+ run : ./bin/ci/scripts/install_dependencies.sh
28
36
29
- # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
30
- # Docs: https://getcomposer.org/doc/articles/scripts.md
31
- - name : Run tests on PHP 7.3
32
- run : php -f ./bin/ci/run_tests.php
33
- - name : Setup PHP 7.4
34
- uses : shivammathur/setup-php@v2
35
- with :
36
- php-version : ' 7.4'
37
- coverage : none
38
- extensions : mbstring, intl, pdo_sqlite, json
39
- ini-values : apc.enabled=1, apc.shm_size=32M, apc.ttl=7200, apc.enable_cli=1, apc.serializer=php
40
- - name : Run tests on PHP 7.4
41
- run : php -f ./bin/ci/run_tests.php
42
- # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
43
- # Docs: https://getcomposer.org/doc/articles/scripts.md
44
- - name : Run tests on PHP 8.0
45
- run : php -f ./bin/ci/run_tests.php
46
- - name : Setup PHP 8.0
47
- uses : shivammathur/setup-php@v2
48
- with :
49
- php-version : ' 8.0'
50
- coverage : none
51
- extensions : mbstring, intl, pdo_sqlite, json
52
- ini-values : apc.enabled=1, apc.shm_size=32M, apc.ttl=7200, apc.enable_cli=1, apc.serializer=php
53
- - name : Run tests on PHP 8.0
37
+ - name : Run PHPCS
38
+ run : ./vendor/bin/phpcs lib/ --report=summary
39
+
40
+ - name : Run PHPMD
41
+ run : ./vendor/bin/phpmd lib/ ansi phpmd.xml
42
+
43
+ - name : Run PHPSTAN (lite)
44
+ run : ./vendor/bin/phpstan analyse lib/ -l 2 -c phpstan_lite.neon 2>&1
45
+
46
+ - name : Run TESTS
47
+ env :
48
+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
49
+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
50
+ GOOGLE_APPLICATION_CREDENTIALS : ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
51
+ GOOGLE_CLOUD_PROJECT : ${{ secrets.GOOGLE_CLOUD_PROJECT }}
54
52
run : php -f ./bin/ci/run_tests.php
0 commit comments