Skip to content

Commit

Permalink
Add PHP 8.1 support to GitHub workflow actions
Browse files Browse the repository at this point in the history
  • Loading branch information
devanych committed Jan 26, 2022
1 parent 7c1f1cc commit 0cd62ef
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 28 deletions.
28 changes: 8 additions & 20 deletions .github/workflows/build.yml
Expand Up @@ -37,8 +37,9 @@ jobs:
- windows-latest

php:
- "7.4"
- "8.0"
- 7.4
- 8.0
- 8.1

steps:
- name: Checkout
Expand Down Expand Up @@ -68,24 +69,11 @@ jobs:
restore-keys: |
php${{ matrix.php }}-composer-
- name: Install dependencies with composer php 7.4
if: matrix.php == '7.4'
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Install dependencies with composer php 8.0
if: matrix.php == '8.0'
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- name: Update composer
run: composer self-update

- name: Run tests with phpunit and coverage on Linux php 7.4
if: matrix.os == 'ubuntu-latest' && matrix.php == '7.4'
run: vendor/bin/phpunit --coverage-clover=coverage.clover --colors=always
- name: Install dependencies with composer
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Run tests with phpunit without coverage
if: matrix.os != 'ubuntu-latest' || matrix.php != '7.4'
- name: Run tests with phpunit
run: vendor/bin/phpunit --colors=always

- name: Upload code coverage scrutinizer on Linux php 7.4
if: matrix.os == 'ubuntu-latest' && matrix.php == '7.4'
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
9 changes: 6 additions & 3 deletions .github/workflows/mutation.yml
Expand Up @@ -31,7 +31,7 @@ jobs:
- ubuntu-latest

php:
- "7.4"
- 8.1

steps:
- name: Checkout
Expand All @@ -40,9 +40,9 @@ jobs:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
php-version: ${{ matrix.php }}
ini-values: memory_limit=-1
coverage: "pcov"
coverage: pcov
tools: composer:v2

- name: Determine composer cache directory
Expand All @@ -56,6 +56,9 @@ jobs:
restore-keys: |
php${{ matrix.php }}-composer-
- name: Update composer
run: composer self-update

- name: Install dependencies with composer
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/static.yml
Expand Up @@ -33,7 +33,9 @@ jobs:
- ubuntu-latest

php:
- "7.4"
- 7.4
- 8.0
- 8.1

steps:
- name: Checkout
Expand All @@ -42,7 +44,7 @@ jobs:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
php-version: ${{ matrix.php }}
tools: composer:v2, cs2pr
coverage: none

Expand All @@ -57,6 +59,9 @@ jobs:
restore-keys: |
php${{ matrix.php }}-composer-
- name: Update composer
run: composer self-update

- name: Install dependencies with composer
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

Expand Down
7 changes: 4 additions & 3 deletions composer.json
Expand Up @@ -10,9 +10,10 @@
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/profiler/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"forum": "https://www.yiiframework.com/forum/",
"wiki": "https://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"chat": "https://t.me/yii3en",
"source": "https://github.com/yiisoft/profiler"
},
"require": {
Expand All @@ -23,7 +24,7 @@
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"roave/infection-static-analysis-plugin": "^1.14",
"roave/infection-static-analysis-plugin": "^1.16",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^4.18"
},
Expand Down

0 comments on commit 0cd62ef

Please sign in to comment.