File tree Expand file tree Collapse file tree 4 files changed +26
-150
lines changed
Expand file tree Collapse file tree 4 files changed +26
-150
lines changed Original file line number Diff line number Diff line change 2222name : build
2323
2424jobs :
25- tests :
26- name : PHP ${{ matrix.php }}-${{ matrix.os }}
27-
28- env :
29- key : cache-v1
30-
31- runs-on : ${{ matrix.os }}
32-
33- strategy :
34- matrix :
35- os :
36- - ubuntu-latest
37- - windows-latest
38-
39- php :
40- - 7.4
41- - 8.0
42- - 8.1
43-
44- steps :
45- - name : Checkout
46- 47-
48- - name : Install PHP
49- uses : shivammathur/setup-php@v2
50- with :
51- php-version : ${{ matrix.php }}
52- ini-values : date.timezone='UTC'
53- coverage : pcov
54- tools : composer:v2
55-
56- - name : Determine composer cache directory on Linux
57- if : matrix.os == 'ubuntu-latest'
58- run : echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
59-
60- - name : Determine composer cache directory on Windows
61- if : matrix.os == 'windows-latest'
62- run : echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
63-
64- - name : Cache dependencies installed with composer
65- uses : actions/cache@v2
66- with :
67- path : ${{ env.COMPOSER_CACHE_DIR }}
68- key : php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
69- restore-keys : |
70- php${{ matrix.php }}-composer-
71-
72- - name : Update composer
73- run : composer self-update
74-
75- - name : Install dependencies with composer
76- run : composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
77-
78- - name : Run tests with phpunit
79- run : vendor/bin/phpunit --colors=always
25+ phpunit :
26+ uses : yiisoft/actions/.github/workflows/phpunit.yml@master
27+ with :
28+ os : >-
29+ ['ubuntu-latest', 'windows-latest']
30+ php : >-
31+ ['7.4', '8.0', '8.1']
Original file line number Diff line number Diff line change @@ -21,49 +21,11 @@ name: mutation test
2121
2222jobs :
2323 mutation :
24- name : PHP ${{ matrix.php }}-${{ matrix.os }}
25-
26- runs-on : ${{ matrix.os }}
27-
28- strategy :
29- matrix :
30- os :
31- - ubuntu-latest
32-
33- php :
34- - 8.1
35-
36- steps :
37- - name : Checkout
38- 39-
40- - name : Install PHP
41- uses : shivammathur/setup-php@v2
42- with :
43- php-version : ${{ matrix.php }}
44- ini-values : memory_limit=-1
45- coverage : pcov
46- tools : composer:v2
47-
48- - name : Determine composer cache directory
49- run : echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
50-
51- - name : Cache dependencies installed with composer
52- uses : actions/cache@v2
53- with :
54- path : ${{ env.COMPOSER_CACHE_DIR }}
55- key : php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
56- restore-keys : |
57- php${{ matrix.php }}-composer-
58-
59- - name : Update composer
60- run : composer self-update
61-
62- - name : Install dependencies with composer
63- run : composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
64-
65- - name : Run infection
66- run : |
67- vendor/bin/roave-infection-static-analysis-plugin -j2 --ignore-msi-with-no-mutations --only-covered
68- env :
69- STRYKER_DASHBOARD_API_KEY : ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
24+ uses : yiisoft/actions/.github/workflows/roave-infection.yml@master
25+ with :
26+ os : >-
27+ ['ubuntu-latest']
28+ php : >-
29+ ['8.1']
30+ secrets :
31+ STRYKER_DASHBOARD_API_KEY : ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
Original file line number Diff line number Diff line change 2222name : static analysis
2323
2424jobs :
25- mutation :
26- name : PHP ${{ matrix.php }}-${{ matrix.os }}
27-
28- runs-on : ${{ matrix.os }}
29-
30- strategy :
31- matrix :
32- os :
33- - ubuntu-latest
34-
35- php :
36- - 7.4
37- - 8.0
38- - 8.1
39-
40- steps :
41- - name : Checkout
42- 43-
44- - name : Install PHP
45- uses : shivammathur/setup-php@v2
46- with :
47- php-version : ${{ matrix.php }}
48- tools : composer:v2, cs2pr
49- coverage : none
50-
51- - name : Determine composer cache directory
52- run : echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
53-
54- - name : Cache dependencies installed with composer
55- uses : actions/cache@v2
56- with :
57- path : ${{ env.COMPOSER_CACHE_DIR }}
58- key : php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
59- restore-keys : |
60- php${{ matrix.php }}-composer-
61-
62- - name : Update composer
63- run : composer self-update
64-
65- - name : Install dependencies with composer
66- run : composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
67-
68- - name : Static analysis
69- run : vendor/bin/psalm --shepherd --stats --output-format=checkstyle | cs2pr --graceful-warnings --colorize
25+ psalm :
26+ uses : yiisoft/actions/.github/workflows/psalm.yml@master
27+ with :
28+ os : >-
29+ ['ubuntu-latest']
30+ php : >-
31+ ['7.4', '8.0', '8.1']
Original file line number Diff line number Diff line change @@ -3,16 +3,16 @@ checks:
33
44filter :
55 paths :
6- - " src/* "
6+ - src/
77
88build :
99 image : default-bionic
1010
1111 environment :
1212 php :
13- version : 8.0.11
13+ version : 8.0.18
1414 ini :
15- " xdebug.mode " : coverage
15+ xdebug.mode : coverage
1616
1717 nodes :
1818 analysis :
2828
2929 tests :
3030 override :
31- - command : " ./vendor/bin/phpunit --coverage-clover ./coverage.xml"
31+ - command : ./vendor/bin/phpunit --coverage-clover ./coverage.xml
3232 on_node : 1
3333 coverage :
3434 file : coverage.xml
You can’t perform that action at this time.
0 commit comments