Skip to content

Merge pull request #22 from tienvx/update-github-actions #91

Merge pull request #22 from tienvx/update-github-actions

Merge pull request #22 from tienvx/update-github-actions #91

Workflow file for this run

name: main
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.0', '8.1', '8.2']
dependency-versions: ['lowest', 'highest']
name: PHP ${{ matrix.php-versions }} with ${{ matrix.dependency-versions }} versions of Composer dependencies
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: phpstan, php-cs-fixer:3
coverage: pcov
- name: Checkout
uses: actions/checkout@v4
- name: Install
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependency-versions }}
- name: Run PHP CS Fixer
run: php-cs-fixer fix --diff --dry-run
env:
PHP_CS_FIXER_IGNORE_ENV: 1
- name: Run PHPStan
run: phpstan
- name: Test & Generate Code Coverage
run: ./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=clover.xml -v
if: matrix.php-versions == '8.0'