55 paths-ignore : ['*.md']
66 pull_request :
77 paths-ignore : ['*.md']
8- branches : [master]
8+ branches : [ master, main ]
99
1010jobs :
1111 analysis :
1212 runs-on : ubuntu-latest
1313 strategy :
1414 matrix :
15- php : [8.0, 8.1 ]
15+ php : [8.2 ]
1616 steps :
17- - uses : actions/checkout@v1
17+ - uses : actions/checkout@v2
1818 - name : Setup PHP
1919 uses : shivammathur/setup-php@v2
2020 with :
@@ -33,68 +33,29 @@ jobs:
3333 php-${{ matrix.php }}-build-
3434 php-${{ matrix.php }}-
3535 - name : Install composer dependencies
36- run : composer install --prefer-dist
37- - name : Run phpstan analysis
38- run : composer phpstan-analysis
39- - name : Run phpmd analysis
40- run : composer phpmd-analysis
41- - name : Run phpcpd analysis
42- run : vendor/bin/phpcpd --min-lines=3 --min-tokens=36 src/
43- laravel8 :
44- needs : [analysis]
45- runs-on : ubuntu-latest
46- strategy :
47- matrix :
48- php : [7.4, 8.0, 8.1]
49- steps :
50- - uses : actions/checkout@v1
51- - name : Setup PHP
52- uses : shivammathur/setup-php@v2
53- with :
54- php-version : ${{ matrix.php }}
55- extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
56- coverage : none
57- - name : Force update laravel version
58- run : composer require "laravel/framework:^8.0" "orchestra/testbench:^6.0" --no-update
59- - name : Remove some dev dependencies
60- run : composer remove "ekino/phpstan-banned-code" "nunomaduro/larastan" "phpmd/phpmd" "phpstan/phpstan-deprecation-rules" "sebastian/phpcpd" --dev --no-update
61- - name : Cache composer dependencies
62- uses : actions/cache@v2
63- env :
64- cache-name : laravel-gcr-worker-laravel8
65- with :
66- path : ~/.composer
67- key : php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
68- restore-keys : |
69- php-${{ matrix.php }}-build-${{ env.cache-name }}-
70- php-${{ matrix.php }}-build-
71- php-${{ matrix.php }}-
72- - name : Install composer dependencies
73- run : composer install --prefer-dist
74- - name : Run the test suite
75- run : phpdbg -qrr -dmemory_limit=3G vendor/bin/phpunit
76- laravel9 :
36+ run : composer install --no-interaction --prefer-dist
37+ - name : Run static analysis
38+ run : composer analyse
39+ test :
40+ name : Test (PHP ${{ matrix.php }})
7741 needs : [ analysis ]
7842 runs-on : ubuntu-latest
7943 strategy :
8044 matrix :
81- php : [ 8.1 ]
45+ php : [ 7.4, 8.0, 8.1 ]
8246 steps :
83- - uses : actions/checkout@v1
84- - name : Setup PHP
47+ - name : Checkout repository
48+ uses : actions/checkout@v2
49+ - name : Set up PHP
8550 uses : shivammathur/setup-php@v2
8651 with :
8752 php-version : ${{ matrix.php }}
8853 extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
8954 coverage : none
90- - name : Force update laravel version
91- run : composer require "laravel/framework:^9.0" "orchestra/testbench:^7.0" --no-update
92- - name : Remove some dev dependencies
93- run : composer remove "ekino/phpstan-banned-code" "nunomaduro/larastan" "phpmd/phpmd" "phpstan/phpstan-deprecation-rules" "sebastian/phpcpd" --dev --no-update
9455 - name : Cache composer dependencies
9556 uses : actions/cache@v2
9657 env :
97- cache-name : laravel-gcr-worker-laravel9
58+ cache-name : laravel-gcr-worker-test
9859 with :
9960 path : ~/.composer
10061 key : php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
@@ -103,40 +64,29 @@ jobs:
10364 php-${{ matrix.php }}-build-
10465 php-${{ matrix.php }}-
10566 - name : Install composer dependencies
106- run : composer install --prefer-dist
107- - name : Run the test suite
108- run : phpdbg -qrr -dmemory_limit=3G vendor/bin/phpunit
109- laravel9-cov :
67+ run : composer install --no-interaction --prefer-dist
68+ - name : Run PHPUnit tests and generate code coverage
69+ run : |
70+ vendor/bin/phpunit
71+ test-coverage :
72+ name : Test (PHP ${{ matrix.php }})
11073 needs : [ analysis ]
11174 runs-on : ubuntu-latest
11275 strategy :
11376 matrix :
114- php : [ 8.0 , 8.1 ]
77+ php : [ 8.2 ]
11578 steps :
116- - uses : actions/checkout@v1
117- - name : Cache composer dependencies
118- uses : actions/cache@v2
119- env :
120- cache-name : cache-gcr-worker-laravel-latest
121- with :
122- path : ~/.composer
123- key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
124- restore-keys : |
125- ${{ runner.os }}-build-${{ env.cache-name }}-
126- ${{ runner.os }}-build-
127- ${{ runner.os }}-
128- - name : Setup PHP
79+ - name : Checkout repository
80+ uses : actions/checkout@v2
81+ - name : Set up PHP
12982 uses : shivammathur/setup-php@v2
13083 with :
13184 php-version : ${{ matrix.php }}
13285 extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
133- coverage : none
134- - name : Force update laravel version
135- run : composer require "laravel/framework:^9.0" "orchestra/testbench:^7.0" --no-update
13686 - name : Cache composer dependencies
13787 uses : actions/cache@v2
13888 env :
139- cache-name : laravel-gcr-worker-laravel9cov
89+ cache-name : laravel-gcr-worker-test
14090 with :
14191 path : ~/.composer
14292 key : php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
@@ -145,10 +95,9 @@ jobs:
14595 php-${{ matrix.php }}-build-
14696 php-${{ matrix.php }}-
14797 - name : Install composer dependencies
148- run : composer install --prefer-dist
149- - name : Run the Coverage test suite
150- run : phpdbg -qrr -dmemory_limit=3G vendor/bin/phpunit --coverage-clover=clover.xml
151- - name : Upload test coverage report to codecov.io
152- env :
153- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
98+ run : composer install --no-interaction --prefer-dist
99+ - name : Run PHPUnit tests and generate code coverage
100+ run : |
101+ vendor/bin/phpunit --coverage-clover=clover.xml
102+ - name : Upload code coverage results
154103 run : bash <(curl -s https://codecov.io/bash)
0 commit comments