Skip to content

add coverage report to ci tests #43

add coverage report to ci tests

add coverage report to ci tests #43

Workflow file for this run

name: Continous Integration
on:
push:
branches:
- main
- 'MTC\-[0-9]+'
pull_request:
jobs:
integration:
name: Integration tests
runs-on: ubuntu-22.04
strategy:
matrix:
php-version: [ 7.4, 8.0, 8.1 ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP Environment
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Install composer requirements.
run: composer install
- name: Check PHP CS
run: ./vendor/bin/php-cs-fixer fix --config .php-cs-fixer.php --dry-run --using-cache no --show-progress dots -v
- name: Test
run: ./vendor/bin/phpunit --coverage-cobertura=coverage.xml
- name: Code Coverage
uses: irongut/[email protected]
with:
filename: coverage.xml
badge: true
format: 'markdown'
output: 'both'
- name: Write to Job Summary
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY