Skip to content

Update doctrine/annotations requirement from ^1.11 to ^1.11 || ^2.0 #65

Update doctrine/annotations requirement from ^1.11 to ^1.11 || ^2.0

Update doctrine/annotations requirement from ^1.11 to ^1.11 || ^2.0 #65

Workflow file for this run

# GitHub Actions Documentation: https://docs.github.com/en/actions
name: build
on: [push, pull_request]
jobs:
tests:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
runs-on: ${{ matrix.operating-system }}
steps:
- name: Set git to use LF on Windows
if: matrix.operating-system == 'windows-latest'
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, ctype, iconv, curl
coverage: xdebug
tools: composer:v2
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-progress --optimize-autoloader
- name: Run unit tests (PHPUnit)
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
- name: "Upload coverage report to Codecov"
uses: codecov/codecov-action@v2
continue-on-error: true
with:
files: ./coverage.clover
- name: "Upload coverage report to CodeClimate"
uses: paambaati/codeclimate-action@v3.0.0
continue-on-error: true
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
- name: Check coding standards (PHP_CodeSniffer)
run: vendor/bin/phpcs
- name: Statically analyze code (Phpstan)
if: ${{ matrix.php-versions }} >= "7.4"
run: vendor/bin/phpstan analyse
- name: Statically analyze code (Psalm)
if: ${{ matrix.php-versions }} >= "7.4"
run: vendor/bin/psalm --output-format=github --taint-analysis --shepherd --report=build/logs/psalm.sarif
- name: "Upload security analysis results to GitHub"
uses: "github/codeql-action/upload-sarif@v1"
with:
sarif_file: "build/logs/psalm.sarif"
- name: "Benchmark for Performance"
if: ${{ matrix.php-versions }} >= "7.4"
run: |
composer require phpbench/phpbench -W
vendor/bin/phpbench run --report=default --revs 1000 -l none