11name : CI
22
3- on :
3+ on :
44 push :
55 pull_request :
66
77env :
88 php_extensions : ' dom, iconv, intl, json, mbstring, opcache, pcntl, pcov, session, simplexml, xml, zip'
99 key : cache-v0.1
1010
11- jobs :
11+ jobs :
1212 lint :
1313 runs-on : ' ${{ matrix.operating_system }}'
14- timeout-minutes : 20
15- strategy :
14+ timeout-minutes : 20
15+ strategy :
1616 matrix :
1717 operating_system :
1818 - ubuntu-latest
1919 php_versions :
2020 - ' 7.4'
21+ - ' 8.0'
22+ - ' 8.1'
23+ - ' 8.2'
2124 fail-fast : false
22- env :
25+ env :
2326 PHP_CS_FIXER_FUTURE_MODE : ' 0'
2427 name : ' Lint PHP'
25- steps :
28+ steps :
2629 - name : ' Checkout'
2730 uses : actions/checkout@v2
2831 - name : ' Setup cache environment'
@@ -39,11 +42,11 @@ jobs:
3942 key : ' ${{ steps.cache-env.outputs.key }}'
4043 restore-keys : ' ${{ steps.cache-env.outputs.key }}'
4144 - name : ' Setup PHP'
42- uses : shivammathur/setup-php@v2
43- with :
45+ uses : shivammathur/setup-php@v2
46+ with :
4447 php-version : ${{ matrix.php_versions }}
4548 extensions : ' ${{ env.php_extensions }}'
46- ini-values : memory_limit=-1
49+ ini-values : memory_limit=-1
4750 tools : pecl, composer
4851 coverage : none
4952 - name : ' Setup problem matchers for PHP (aka PHP error logs)'
5558 working-directory : ' ./'
5659 - name : ' Linting PHP source files'
5760 run : ' vendor/bin/ecs check --config=ecs.php .'
58- test :
59- strategy :
60- fail-fast : false
61- matrix :
62- operating_system :
63- - ubuntu-latest
64- php_versions :
65- - ' 7.2'
66- - ' 7.3'
67- - ' 7.4'
68- - ' 8.0'
69- runs-on : ' ${{ matrix.operating_system }}'
70- name : ' Test / PHP ${{ matrix.php_versions }}'
71- needs :
72- - lint
73- steps :
74- - name : Checkout
75- uses : actions/checkout@v2
76- - name : ' Setup cache environment'
77- id : cache-env
78- uses : shivammathur/cache-extensions@v1
79- with :
80- php-version : ${{ matrix.php_versions }}
81- extensions : ${{ env.php_extensions }}
82- key : ' ${{ env.key }}'
83- - name : ' Cache extensions'
84- uses : actions/cache@v1
85- with :
86- path : ' ${{ steps.cache-env.outputs.dir }}'
87- key : ' ${{ steps.cache-env.outputs.key }}'
88- restore-keys : ' ${{ steps.cache-env.outputs.key }}'
89- - name : ' Setup PHP'
90- uses : shivammathur/setup-php@v2
91- with :
92- php-version : ${{ matrix.php_versions }}
93- extensions : ${{ env.php_extensions }}
94- ini-values : ' pcov.directory=src, date.timezone=UTC, upload_max_filesize=20M, post_max_size=20M, memory_limit=512M, short_open_tag=Off'
95- coverage : pcov
96- tools : ' phpunit'
97- - name : ' Install PHP dependencies with Composer'
98- run : composer install --prefer-dist --no-progress --no-suggest --optimize-autoloader
99- working-directory : ' ./'
100- - name : ' Run Unit Tests with PHPUnit'
101- run : ' ./vendor/bin/phpunit --verbose --stderr --configuration phpunit.github.xml --coverage-clover build/logs/clover.xml --coverage-text'
102- working-directory : ' ./'
103- - name : Upload coverage results to Coveralls
104- env :
105- COVERALLS_REPO_TOKEN : ${{ secrets.GITHUB_TOKEN }}
106- COVERALLS_PARALLEL : true
107- COVERALLS_FLAG_NAME : php-${{ matrix.php_versions }}
108- run : ./vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
109- coverage :
110- needs : test
111- runs-on : ubuntu-latest
112- name : " Code coverage"
113- steps :
114- - name : Coveralls Finished
115- uses : coverallsapp/github-action@v1.1.2
116- with :
117- github-token : ${{ secrets.GITHUB_TOKEN }}
118- parallel-finished : true
0 commit comments