Merge pull request #20 from m3m0r7/impl-of-keyword-arguments #25
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: PHP Testing | |
on: [push] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 | |
with: | |
ruby-version: '3.2' | |
- name: composer cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/vendor | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: composer install | |
if: steps.composer-cache.outputs.cache-hit != 'true' | |
run: | | |
./composer.phar install | |
- name: Run PHPStan | |
run: | | |
./composer.phar lint | |
- name: Run linter | |
run: | | |
./composer.phar lint:fix | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 | |
with: | |
ruby-version: '3.2' | |
- name: composer cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/vendor | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: composer install | |
if: steps.composer-cache.outputs.cache-hit != 'true' | |
run: | | |
./composer.phar install | |
- name: Run test | |
run: | | |
ENV=ci ./vendor/bin/phpunit tests/ |