Skip to content

Modernisation efforts #51

Modernisation efforts

Modernisation efforts #51

Workflow file for this run

name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '8.1', '8.2', '8.3' ]
steps:
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer,phive
coverage: xdebug
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- uses: actions/checkout@v2
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress
- name: Install tools
run: phive --no-progress install --trust-gpg-keys 4AA394086372C20A,12CE0F1D262429A5
- name: Run test suite
run: composer run-script test -- --coverage-clover build/coverage.xml
- name: Run static analysis
run: composer run-script static -- --output-format=github --shepherd
- uses: codecov/codecov-action@v1
with:
file: ./build/coverage.xml
flags: unit,integration
fail_ci_if_error: true