Skip to content

Additional check for QualificationValue (#100) #520

Additional check for QualificationValue (#100)

Additional check for QualificationValue (#100) #520

Workflow file for this run

name: CI
on:
pull_request:
push:
jobs:
test:
name: "PHPUnit PHP ${{ matrix.php }}"
strategy:
matrix:
php: [ 7.4, 8.0, 8.1, 8.2, 8.3 ]
include:
- php: '7.4'
coverage: true
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring
tools: composer, cs2pr
coverage: pcov
- uses: actions/checkout@v2
- name: Cache Composer cache
uses: actions/cache@v2
with:
path: ~/.composer/cache
key: composer-cache-php${{ matrix.php }}
- name: Composer install
run: composer install --no-progress --no-suggest --no-interaction --prefer-dist --optimize-autoloader
- name: Enable code coverage
if: matrix.coverage
run: echo "COVERAGE=1" >> $GITHUB_ENV
- name: PHPUnit
run: |
mkdir -p build/logs/phpunit
if [ "$COVERAGE" = '1' ]; then
vendor/bin/phpunit --coverage-clover build/logs/phpunit/clover.xml --log-junit build/logs/phpunit/junit.xml --colors=always
else
vendor/bin/phpunit --log-junit build/logs/phpunit/junit.xml --colors=always
fi
- name: Upload coverage results to Codecov
if: matrix.coverage
uses: codecov/codecov-action@v1
with:
name: phpunit-php${{ matrix.php }}
flags: phpunit
fail_ci_if_error: true
continue-on-error: true
static-analysis:
name: "Static Analysis"
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: mbstring
tools: composer, cs2pr
- uses: actions/checkout@v2
- name: Cache Composer cache
uses: actions/cache@v2
with:
path: ~/.composer/cache
key: composer-cache-php7.4
- name: Composer install
run: composer install --no-progress --no-suggest --no-interaction --prefer-dist --optimize-autoloader
- name: Psalm
run: php vendor/bin/psalm --threads=2 --output-format=github --shepherd --stats
- name: PHPStan
run: php vendor/bin/phpstan analyse --error-format=checkstyle --no-progress src/ tests/ | cs2pr