docs(contributing): Fix commit format syntax #312
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: PHP Unit Tests | |
| on: | |
| push: | |
| branches: [ "main", "epic/**", "feature/**", "fix/**", "refactor/**" ] | |
| pull_request: | |
| branches: [ "main", "epic/**" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate --strict | |
| - name: Cache Composer packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-php- | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run PHPUnit with coverage | |
| run: vendor/bin/phpunit --coverage-clover clover.xml --display-warnings | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: clover-report | |
| path: clover.xml | |
| coverage: | |
| needs: tests | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download coverage artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: clover-report | |
| - name: Upload coverage to Codecov | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| if: ${{ env.CODECOV_TOKEN != '' }} | |
| continue-on-error: true | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: clover.xml | |
| token: ${{ env.CODECOV_TOKEN }} | |
| fail_ci_if_error: false |