Skip to content

Static Code Anylzer & Tests #142

Static Code Anylzer & Tests

Static Code Anylzer & Tests #142

Workflow file for this run

name: Static Code Anylzer & Tests
on:
push:
schedule:
- cron: '0 0 * * THU'
jobs:
security-checker:
name: security-checker
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
tools: composer:v2
- uses: actions/checkout@v2
- run: composer install --prefer-dist
- uses: symfonycorp/security-checker-action@v3
phpcpd:
name: phpcpd
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
tools: composer:v2, phpcpd
- name: Checkout
uses: actions/[email protected]
- run: composer install --prefer-dist
- run: ./vendor/bin/phpcpd ./ --exclude=vendor --exclude=bin --exclude=tests
php-cs-fixer:
name: php-cs-fixer
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
tools: composer:v2, php-cs-fixer, cs2pr
- name: Checkout
uses: actions/[email protected]
- run: composer install --prefer-dist
- run: ./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --dry-run --using-cache=no --format=checkstyle | cs2pr
psalm:
name: psalm
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
- uses: actions/checkout@v2
- run: composer install --prefer-dist
- run: ./vendor/bin/psalm --output-format=github
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.0', '8.1', '8.2']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
tools: composer:v2
php-version: ${{ matrix.php-versions }}
- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php-versions }}
version: 2
- run: XDEBUG_MODE=coverage ./vendor/bin/phpunit
- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v