Repository navigation
Minor feature improvements and bug fixes #387
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| coverage: none | |
| - name: Install Dependencies | |
| uses: ramsey/composer-install@v3 | |
| - name: Run Security Audit (Composer Audit) | |
| run: composer audit | |
| style: | |
| name: Check Code Style | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.5' | |
| extensions: dom, mbstring, zip, libxml, json, tokenizer, fileinfo | |
| coverage: none | |
| - name: Install Dependencies | |
| uses: ramsey/composer-install@v3 | |
| - name: Check Code Style (Pint) | |
| run: ./vendor/bin/pint --test | |
| analyze: | |
| name: Static Analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.5' | |
| extensions: dom, mbstring, zip, libxml, json, tokenizer, fileinfo | |
| coverage: none | |
| - name: Install Dependencies | |
| uses: ramsey/composer-install@v3 | |
| - name: Run Static Analysis (PHPStan) | |
| run: ./vendor/bin/phpstan analyse --no-progress | |
| test: | |
| name: PHP ${{ matrix.php }} (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| php: ['8.2', '8.3', '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 }} | |
| extensions: dom, mbstring, zip, libxml, json, tokenizer, fileinfo | |
| coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' && 'pcov' || 'none' }} | |
| - name: Install Dependencies | |
| uses: ramsey/composer-install@v3 | |
| with: | |
| dependency-versions: ${{ matrix.php == '8.2' && 'lowest' || 'highest' }} | |
| - name: Warm Up TypePHP Cache | |
| run: php bin/typephp cache:warm | |
| - name: Run Full Test Suite with Coverage (Pest) | |
| run: ./vendor/bin/pest --coverage-clover=clover.xml --compact | |
| if: matrix.os == 'ubuntu-latest' && matrix.php == '8.4' | |
| - name: Run Full Test Suite (Pest) | |
| run: ./vendor/bin/pest --compact | |
| if: "! (matrix.os == 'ubuntu-latest' && matrix.php == '8.4')" | |
| - name: Upload Coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| if: matrix.os == 'ubuntu-latest' && matrix.php == '8.4' | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: clover.xml | |
| fail_ci_if_error: false |