Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/php-cs-stan-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,31 +153,34 @@ jobs:
- name: 'Dump Composer autoloader'
run: 'composer dump-autoload --classmap-authoritative --no-cache'

- name: 'Set file prefix in environment'
run: echo "FILE_PREFIX=${{ inputs.bedita_version }}-${{ matrix.php-version }}-${{ strategy.job-index }}" >> $GITHUB_ENV

- name: 'Run PHPUnit with coverage and JUnit report'
run: 'vendor/bin/phpunit --coverage-clover=${{ matrix.php-version }}-${{ strategy.job-index }}-clover.xml --log-junit ${{ matrix.php-version }}-${{ strategy.job-index }}-junit.xml'
run: 'vendor/bin/phpunit --coverage-clover=${{ env.FILE_PREFIX }}-clover.xml --log-junit ${{ env.FILE_PREFIX }}-junit.xml'

- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
with:
files: './${{ matrix.php-version }}-${{ strategy.job-index }}-junit.xml'
files: './${{ env.FILE_PREFIX }}-junit.xml'
token: ${{ secrets.CODECOV_TOKEN }}

- name: Check test coverage
id: test-coverage
uses: johanvanhelden/gha-clover-test-coverage-check@v1
with:
percentage: '85'
filename: '${{ matrix.php-version }}-${{ strategy.job-index }}-clover.xml'
filename: '${{ env.FILE_PREFIX }}-clover.xml'

- name: 'Export coverage results'
uses: 'codecov/codecov-action@v5'
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
files: './${{ matrix.php-version }}-${{ strategy.job-index }}-clover.xml'
files: './${{ env.FILE_PREFIX }}-clover.xml'
env_vars: PHP_VERSION

- name: 'Archive code coverage results'
uses: 'actions/upload-artifact@v4'
with:
name: 'PHP-${{ matrix.php-version }}-strategy-job-index-${{ strategy.job-index }}'
path: '${{ matrix.php-version }}-${{ strategy.job-index }}-clover.xml'
path: '${{ env.FILE_PREFIX }}-clover.xml'
13 changes: 8 additions & 5 deletions .github/workflows/php-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,31 +91,34 @@ jobs:
- name: 'Dump Composer autoloader'
run: 'composer dump-autoload --classmap-authoritative --no-cache'

- name: 'Set file prefix in environment'
run: echo "FILE_PREFIX=${{ inputs.bedita_version }}-${{ matrix.php-version }}-${{ strategy.job-index }}" >> $GITHUB_ENV

- name: 'Run PHPUnit with coverage and JUnit report'
run: 'vendor/bin/phpunit --coverage-clover=${{ matrix.php-version }}-${{ strategy.job-index }}-clover.xml --log-junit ${{ matrix.php-version }}-${{ strategy.job-index }}-junit.xml'
run: 'vendor/bin/phpunit --coverage-clover=${{ env.FILE_PREFIX }}-clover.xml --log-junit ${{ env.FILE_PREFIX }}-junit.xml'

- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
with:
files: './${{ matrix.php-version }}-${{ strategy.job-index }}-junit.xml'
files: './${{ env.FILE_PREFIX }}-junit.xml'
token: ${{ secrets.CODECOV_TOKEN }}

- name: Check test coverage
id: test-coverage
uses: johanvanhelden/gha-clover-test-coverage-check@v1
with:
percentage: '${{ inputs.coverage_min_percentage }}'
filename: '${{ matrix.php-version }}-${{ strategy.job-index }}-clover.xml'
filename: '${{ env.FILE_PREFIX }}-clover.xml'

- name: 'Export coverage results'
uses: 'codecov/codecov-action@v5'
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
files: './${{ matrix.php-version }}-${{ strategy.job-index }}-clover.xml'
files: './${{ env.FILE_PREFIX }}-clover.xml'
env_vars: PHP_VERSION

- name: 'Archive code coverage results'
uses: 'actions/upload-artifact@v4'
with:
name: 'BEDITA-${{ inputs.bedita_version }}-PHP-${{ matrix.php-version }}-strategy-job-index-${{ strategy.job-index }}'
path: '${{ inputs.bedita_version }}-${{ matrix.php-version }}-${{ strategy.job-index }}-clover.xml'
path: '${{ env.FILE_PREFIX }}-clover.xml'