Update README.md #36
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: Complete Workflow | |
| on: | |
| push: | |
| paths: | |
| - '**/*.*' | |
| pull_request: | |
| paths: | |
| - '**/*.*' | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Actions | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| coverage: xdebug | |
| - name: Install Composer Dependencies | |
| run: composer install --no-progress --prefer-dist --optimize-autoloader | |
| - name: Run psalm | |
| run: ./vendor/bin/psalm --shepherd --threads=2 --no-cache --output-format=github | |
| - name: Run Tests | |
| run: | | |
| php vendor/bin/phpunit --coverage-clover coverage.xml --configuration phpunit.xml tests | |
| - name: Download clover-to-cobertura converter | |
| run: | | |
| curl https://raw.githubusercontent.com/ngyuki/clover-to-cobertura/master/clover-to-cobertura.php -o clover-to-cobertura.php | |
| - name: Convert Clover to Cobertura | |
| run: | | |
| php clover-to-cobertura.php < coverage.xml > coverage-cobertura.xml | |
| - uses: qltysh/qlty-action/coverage@v2 | |
| with: | |
| token: ${{ secrets.QLTY_COVERAGE_TOKEN }} | |
| files: ./coverage-cobertura.xml | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4.0.1 | |
| with: | |
| files: ./coverage.xml | |
| verbose: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: PHP Mess Detector | |
| uses: php-actions/phpmd@v1 | |
| with: | |
| php_version: 8.1 | |
| path: src/,demos/,tests/ | |
| output: text | |
| ruleset: phpmd.xml |