Merge pull request #775 from AJenbo/null #37
This file contains 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: Coverage | |
on: | |
push: | |
branches: [ '**' ] | |
pull_request: | |
branches: [ '**' ] | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: ['8.3'] | |
setup: ['stable'] | |
name: PHP ${{ matrix.php }} - ${{ matrix.setup }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: json | |
tools: composer:v2 | |
coverage: xdebug | |
- name: Imagick SVG support | |
run: sudo apt-get install libmagickcore-6.q16-3-extra | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-coverage-php-${{ matrix.php }}-${{ matrix.setup }}-${{ hashFiles('**/composer.json') }} | |
- name: Install dependencies | |
if: steps.composer-cache.outputs.cache-hit != 'true' | |
run: | | |
composer require symfony/config:^5 symfony/dependency-injection:^5 symfony/filesystem:^5 --no-update --no-interaction | |
composer update --prefer-dist --no-progress --prefer-${{ matrix.setup }} | |
- name: Coverage | |
run: vendor/bin/paratest --coverage-clover=coverage.xml --coverage-text --coverage-html=coverage | |
env: | |
XDEBUG_MODE: coverage | |
- name: Archive Code Coverage Results | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./coverage.xml | |
token: ${{ secrets.CODECOV_TOKEN }} |