Merge pull request #4 from shadowhand/log-append #27
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php-version: ['8.4', '8.5'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: mbstring, json | |
| coverage: pcov | |
| tools: composer:v2 | |
| - name: Validate composer.json | |
| run: composer validate --strict | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: composer-${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| composer-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: composer install --no-progress --no-interaction | |
| - name: Run Mago style check | |
| run: composer run lint | |
| - name: Run Mago static analysis | |
| run: composer run analyze | |
| - name: Run PHPUnit tests | |
| run: composer run test | |
| - name: Check code coverage | |
| run: composer run cover |