Skip to content

Merge pull request #47 from m3m0r7/refactor-5 #129

Merge pull request #47 from m3m0r7/refactor-5

Merge pull request #47 from m3m0r7/refactor-5 #129

Workflow file for this run

name: PHP Testing
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['3.2', '3.3.0']
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Setup Ruby
uses: ruby/[email protected]
with:
ruby-version: ${{ matrix.ruby }}
- 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
strategy:
matrix:
ruby: ['3.2', '3.3.0']
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Setup Ruby
uses: ruby/[email protected]
with:
ruby-version: ${{ matrix.ruby }}
- 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/