Update dependencies #82
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PHP Quality Assurance | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
static-qa: | |
runs-on: ubuntu-latest | |
if: ${{ !contains(github.event.head_commit.message, 'no static qa') }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
coverage: none | |
tools: cs2pr | |
- name: Install dependencies | |
uses: ramsey/composer-install@v2 | |
- name: Check code styles | |
run: | | |
./vendor/bin/phpcs -q --report-full --report-checkstyle="phpcs-report.xml" --runtime-set testVersion 7.0- --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 | |
cs2pr --graceful-warnings phpcs-report.xml | |
- name: Check Psalm | |
run: ./vendor/bin/psalm --output-format=github --no-cache | |
unit-tests: | |
runs-on: ubuntu-latest | |
if: ${{ !contains(github.event.head_commit.message, 'no unit tests') }} | |
strategy: | |
fail-fast: true | |
matrix: | |
php-ver: [ '7.4', '8.0', '8.1', '8.2' ] | |
deps-mode: [ 'lowest', 'highest' ] | |
include: | |
- php-ver: '8.1' | |
dependency-versions: 'highest' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-ver }} | |
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On | |
coverage: none | |
tools: cs2pr, parallel-lint:^1.3.1 | |
- name: Check syntax error in sources | |
if: ${{ (matrix.deps-mode == 'highest') }} | |
run: parallel-lint ./Inpsyde/ ./tests/src/ ./tests/cases/ --checkstyle | cs2pr | |
- name: Remove Psalm before tests to prevent installation conflicts | |
run: composer remove vimeo/psalm --no-update | |
- name: Install dependencies | |
uses: ramsey/composer-install@v2 | |
with: | |
dependency-versions: ${{ matrix.deps-mode }} | |
- name: Migrate PHPUnit config for PHPUnit 9 | |
if: ${{ (matrix.php-ver >= 7.3) && (matrix.deps-mode == 'highest') }} | |
run: ./vendor/bin/phpunit --migrate-configuration | |
- name: Run unit tests | |
run: ./vendor/bin/phpunit --testsuite=unit --no-coverage |