Merge pull request #9 from tienvx/update-example-usage #37
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: main | |
on: [push, pull_request] | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: ['8.1', '8.2', '8.3'] | |
dependencies: ['lowest', 'highest'] | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: pcov | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install | |
uses: ramsey/composer-install@v3 | |
with: | |
dependency-versions: ${{ matrix.dependencies }} | |
- name: Run PHP CS Fixer | |
uses: docker://oskarstark/php-cs-fixer-ga | |
with: | |
args: --diff --dry-run | |
- name: Run PHPStan | |
uses: docker://oskarstark/phpstan-ga | |
env: | |
REQUIRE_DEV: true | |
- 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: ${{ github.event_name == 'push' && matrix.php == '8.1' && matrix.dependencies == 'highest' }} |