Skip to content

Update Composer QA tooling dependencies (#229) #439

Update Composer QA tooling dependencies (#229)

Update Composer QA tooling dependencies (#229) #439

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
tests:
name: "PHP ${{ matrix.php }} + Doctrine ORM ${{ matrix.doctrine-orm }} + Composer ${{ matrix.composer-flags }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: '8.1'
- php: '8.2'
- php: '8.3'
ignore-php-version: true
calculate-code-coverage: true
- doctrine-orm: '2.14'
- doctrine-orm: '3.0'
- doctrine-orm: 'latest'
steps:
- uses: actions/checkout@v4
- name: Set up PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php || '8.3' }}
coverage: xdebug
extensions: ctype, json, mbstring
tools: composer
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install composer dependencies
run: |
if [ "${{ matrix.doctrine-orm }}" == "2.14" ]; then
composer require doctrine/orm "~2.14" --prefer-dist --no-interaction --no-progress ${{ matrix.composer-flags }}
elif [ "${{ matrix.doctrine-orm }}" == "3.0" ]; then
composer require doctrine/orm "~3.0" --prefer-dist --no-interaction --no-progress ${{ matrix.composer-flags }}
else
composer update --prefer-dist --no-interaction --no-progress ${{ matrix.composer-flags }}
fi
- name: Run static analysis
run: composer run-static-analysis
continue-on-error: ${{ matrix.continue-on-error || false }}
- name: Check code style
run: composer check-code-style
if: matrix.ignore-php-version == true
env:
PHP_CS_FIXER_IGNORE_ENV: 1
- name: Check for security vulnerabilities in 3rd party dependencies
run: composer audit
- name: Run test suite
run: composer run-tests-with-clover
- name: Upload coverage results to Coveralls
if: matrix.calculate-code-coverage == true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: "PHP ${{ matrix.php }} + Composer@${{ matrix.composer-flags || '*' }}"
run: bin/php-coveralls -v --exclude-no-stmt