Skip to content

Create code coverage during the CI builds #213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2021
Merged
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
26 changes: 14 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,11 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
php-version: [ '5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3' ]
coverage: [ 'none' ]
include:
- php-version: 7.4
coverage: xdebug

steps:
- name: Checkout
Expand All @@ -59,7 +54,7 @@ jobs:
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
coverage: none
coverage: "${{ matrix.coverage }}"

- name: Cache dependencies installed with composer
uses: actions/cache@v1
Expand All @@ -75,4 +70,11 @@ jobs:
composer show;

- name: Run Tests
run: ./vendor/bin/phpunit
run: ./vendor/bin/phpunit --coverage-clover build/coverage/xml

- name: Upload coverage results to Coveralls
if: "${{ matrix.coverage != 'none' }}"
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
./vendor/bin/codacycoverage clover build/coverage/xml