Skip to content

Struct type

Struct type #87

Workflow file for this run

name: QA
on: [ pull_request ]
jobs:
check-dependencies:
name: Composer Require Checker - ${{ matrix.php }} ${{ matrix.dependencies }}
strategy:
fail-fast: false
matrix:
php:
- "8.1"
- "8.2"
- "8.3"
dependencies:
- ""
- "--prefer-lowest"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ctype
coverage: pcov
- name: Install dependencies
run: composer update --no-progress --no-interaction ${{ matrix.dependencies }}
- name: Check Dependencies
run: composer check-deps
code-style:
name: PHP CS Fixer - ${{ matrix.php }} ${{ matrix.dependencies }}
strategy:
fail-fast: false
matrix:
php:
- "8.1"
- "8.2"
dependencies:
- ""
- "--prefer-lowest"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ctype
- name: Install dependencies
run: composer update --no-progress --no-interaction ${{ matrix.dependencies }}
- name: Check Code Style
run: composer cs-check
phpstan:
name: PHPStan - ${{ matrix.php }} ${{ matrix.dependencies }}
strategy:
fail-fast: false
matrix:
php:
- "8.1"
- "8.2"
- "8.3"
dependencies:
- ""
- "--prefer-lowest"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ctype
- name: Install dependencies
run: composer update --no-progress --no-interaction ${{ matrix.dependencies }}
- name: PHPStan
run: composer phpstan -- --no-progress
psalm:
name: Psalm - ${{ matrix.php }} ${{ matrix.dependencies }}
strategy:
fail-fast: false
matrix:
php:
- "8.1"
- "8.2"
- "8.3"
dependencies:
- ""
- "--prefer-lowest"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ctype
- name: Install dependencies
run: composer update --no-progress --no-interaction ${{ matrix.dependencies }}
- name: Psalm
run: composer psalm
phpunit:
name: PHPUnit - ${{ matrix.php }} ${{ matrix.dependencies }}
strategy:
fail-fast: false
matrix:
php:
- "8.1"
- "8.2"
- "8.3"
dependencies:
- ""
- "--prefer-lowest"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ctype
coverage: pcov
- name: Install dependencies
run: composer update --no-progress --no-interaction ${{ matrix.dependencies }}
- name: PHPUnit
run: |
vendor/bin/phpunit \
--coverage-xml=build/coverage/coverage-xml \
--log-junit=build/coverage/junit.xml \
--coverage-clover=build/coverage/clover.xml
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: coverage-${{ matrix.php }}
path: build/coverage/
infection:
name: Infection - ${{ matrix.php }} ${{ matrix.dependencies }}
needs: phpunit
strategy:
fail-fast: false
matrix:
php:
- "8.1"
- "8.2"
- "8.3"
dependencies:
- ""
- "--prefer-lowest"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ctype
coverage: pcov
- name: Install dependencies
run: composer update --no-progress --no-interaction ${{ matrix.dependencies }}
- name: Download coverage
uses: actions/download-artifact@v3
with:
name: coverage-${{ matrix.php }}
path: build/coverage/
- name: Infection coverage of changed lines
if: "!contains(github.event.pull_request.labels.*.name, 'skip-infection')"
run: |
git fetch origin $GITHUB_BASE_REF $GITHUB_HEAD_REF
vendor/bin/infection \
--coverage=build/coverage \
--git-diff-base=origin/$GITHUB_BASE_REF \
--git-diff-lines \
--logger-github \
--min-msi=100 \
--min-covered-msi=100 \
--ignore-msi-with-no-mutations \
-jmax
- name: Save Infection result
uses: actions/upload-artifact@v3
if: always()
with:
name: infection-log-${{ matrix.php }}.txt
path: infection-log.txt
bc-breaks:
name: Backward Compatibility
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: ctype
- name: Install dependencies
run: composer update --no-progress --no-interaction
- name: "Check for BC breaks"
run: vendor/bin/roave-backward-compatibility-check