Skip to content

Update README.md badge #23

Update README.md badge

Update README.md badge #23

Workflow file for this run

name: build
on: [push, pull_request]
env:
DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
phpunit:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: 7.3
- php: 7.4
- php: 8.0
- php: 8.1
- php: 8.2
- php: 8.3
- php: 8.4
steps:
- name: Checkout.
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Install PHP.
uses: shivammathur/setup-php@v2
with:
extensions: opcache, curl, dom, mbstring, pdo, pdo_sqlite, sqlite3, json, xml, xmlwriter, tokenizer, openssl, iconv
ini-values: opcache.enabled=on, opcache.enable_cli=on
php-version: ${{ matrix.php }}
- name: Install dependencies.
if: matrix.php != '8.4'
run: composer update $DEFAULT_COMPOSER_FLAGS
- name: Install dependencies with PHP 8.4.
if: matrix.php == '8.4'
run: composer update $DEFAULT_COMPOSER_FLAGS --ignore-platform-reqs
- name: Run tests with PHPUnit.
if: matrix.php != '7.4'
run: vendor/bin/phpunit --verbose --colors=always
- name: Run tests with PHPUnit and generate coverage.
if: matrix.php == '7.4'
run: vendor/bin/phpunit --verbose --colors=always --coverage-clover=coverage.xml
- name: Upload Scrutinizer coverage
uses: sudo-bot/action-scrutinizer@latest
if: github.repository == 'lav45/yii2-settings' && matrix.php == '7.4'
with:
cli-args: "--format=php-clover coverage.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"