docs/ci: add PSR Compliance section; add CI/Codecov/Packagist badges;… #7
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 | |
| - 'development' | |
| - 'feature/*' | |
| - 'bugfix/*' | |
| - 'hotfix/*' | |
| - 'releases/*' | |
| - 'v*.*.*' | |
| pull_request: | |
| branches: | |
| - main | |
| - 'development' | |
| - 'feature/*' | |
| - 'bugfix/*' | |
| - 'hotfix/*' | |
| - 'releases/*' | |
| - 'v*.*.*' | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php-version: ['8.4'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| coverage: xdebug | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Validate composer.json | |
| run: composer validate --no-check-lock | |
| - name: Run tests with coverage | |
| run: composer test-coverage | |
| - name: Run static analysis | |
| run: composer psalm | |
| - name: Check code style | |
| run: composer cs-check | |
| - name: Upload coverage | |
| if: matrix.php-version == '8.4' && hashFiles('coverage.xml') != '' | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: coverage.xml |