chore(deps): Bump codecov/codecov-action from 5 to 6 (#12) #17
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: [master] | |
| pull_request: | |
| branches: [master] | |
| permissions: | |
| contents: read | |
| jobs: | |
| security-analysis: | |
| name: Security Analysis (Psalm Taint) | |
| 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' | |
| tools: composer:v2 | |
| - name: Get Composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress --no-interaction | |
| - name: Run Psalm Taint Analysis | |
| run: vendor/bin/psalm --taint-analysis | |
| tests: | |
| name: PHP ${{ matrix.php }} Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.4', '8.5'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: xdebug | |
| tools: composer:v2 | |
| - name: Get Composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress --no-interaction | |
| - name: Security audit | |
| run: composer audit --no-dev | |
| - name: Run PHPStan | |
| run: vendor/bin/phpstan analyse | |
| - name: Run Psalm | |
| run: vendor/bin/psalm --show-info=false | |
| - name: Run PHPMD | |
| run: vendor/bin/phpmd src,tests text phpmd.xml | |
| - name: Run Rector | |
| run: vendor/bin/rector process --dry-run | |
| - name: Check code style | |
| run: vendor/bin/php-cs-fixer fix --dry-run --diff | |
| - name: Run tests with coverage | |
| run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml --coverage-xml=build/coverage/coverage-xml --log-junit=build/coverage/junit.xml | |
| - name: Run Deptrac | |
| run: vendor/bin/deptrac analyse | |
| - name: Run Infection | |
| run: vendor/bin/infection --threads=4 --coverage=build/coverage --skip-initial-tests --min-msi=100 --min-covered-msi=100 --logger-github | |
| - name: Generate SBOM | |
| run: composer sbom | |
| - name: Upload SBOM artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: sbom-php${{ matrix.php }} | |
| path: sbom.json | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| files: ./coverage.xml | |
| fail_ci_if_error: false |