Skip to content

Bump GH actions

Bump GH actions #33

Workflow file for this run

name: PHPUnit Tests via Composer
on: [push]
jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ ubuntu-latest ]
php: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]
name: Build and test on ${{ matrix.php }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Force PHP ${{ matrix.php }}
uses: nanasess/setup-php@v4
with:
php-version: ${{ matrix.php }}
- name: Validate composer.json and composer.lock
run: composer validate
- name: Require php-cs-fixer
run: |
mkdir --parents ./tools/php-cs-fixer
composer require --working-dir=tools/php-cs-fixer friendsofphp/php-cs-fixer "friendsofphp/php-cs-fixer" --prefer-dist --no-progress
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Unit tests
run: |
mkdir --parents ./src ./tests
./vendor/bin/phpunit --no-coverage --colors=never
- name: Psalm
run: |
./vendor/bin/psalm --monochrome --no-progress --stats --show-info=false
- name: phpstan
run: |
./vendor/bin/phpstan --no-interaction --no-ansi analyse
- name: Mess Detector Sources
run: |
./vendor/bin/phpmd src text codesize,controversial,naming,unusedcode
- name: Mess Detector Tests
run: |
/vendor/bin/phpmd tests text codesize,controversial,design
- name: php-cs-fixer
run: |
./tools/php-cs-fixer/vendor/bin/php-cs-fixer fix -v --config=.php-cs-fixer.dist.php --using-cache=no --dry-run