Skip to content

feat: add publishable discovery config with skip_classes and skip_paths #164

feat: add publishable discovery config with skip_classes and skip_paths

feat: add publishable discovery config with skip_classes and skip_paths #164

Workflow file for this run

name: CI
on:
push:
branches: [main, develop, 'feature/**', 'hotfix/**', 'release/**']
pull_request:
branches: [main, develop]
jobs:
tests:
name: Tests PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: ['8.3', '8.4']
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: pcov
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Execute unit tests
run: composer test:unit
- name: Generate coverage report
if: matrix.php == '8.4'
run: vendor/bin/pest --colors=always --coverage --coverage-clover=coverage.xml
- name: Upload coverage artifact
if: matrix.php == '8.4'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.xml
code-quality:
name: Code Quality
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: none
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Check code style
run: composer test:lint
- name: Static analysis
run: composer test:types
- name: Rector analysis
run: composer test:refacto
- name: Type coverage
run: composer test:type-coverage
- name: Security audit
run: composer audit
coverage-upload:
name: Upload Coverage
runs-on: ubuntu-latest
needs: tests
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Download coverage artifact
uses: actions/download-artifact@v4
with:
name: coverage-report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: false
validate-changelog:
name: Validate Changelog
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.base_ref == 'main'
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Check Unreleased section has entries
run: |
UNRELEASED=$(awk '/^## \[Unreleased\]/{found=1; next} /^## \[/{exit} found{print}' CHANGELOG.md | grep -v '^$' | head -1)
if [ -z "$UNRELEASED" ]; then
echo "::error::CHANGELOG.md [Unreleased] section is empty. Add entries before merging to main."
exit 1
fi
echo "Changelog has unreleased entries — OK"