Skip to content

Commit

Permalink
Replace Scrutinizer with Codecov for code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
scheb committed Feb 25, 2024
1 parent 0e11a58 commit 1d07e40
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 28 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/.gitignore export-ignore
/.gitsplit.yml export-ignore
/.php_cs.dist export-ignore
/.scrutinizer.yml export-ignore
/CONTRIBUTING.md export-ignore
/php_cs.xml export-ignore
/phpunit.xml.dist export-ignore
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ on:
jobs:
coding-standards:
name: 'Coding Standards - PHP ${{ matrix.php-version }}'

runs-on: 'ubuntu-latest'
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}

strategy:
fail-fast: false
Expand Down Expand Up @@ -54,8 +55,9 @@ jobs:

tests:
name: 'Tests - PHP ${{ matrix.php-version }}'

runs-on: ubuntu-latest
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}

strategy:
fail-fast: false
Expand Down Expand Up @@ -96,8 +98,9 @@ jobs:

code-coverage:
name: 'Code Coverage - PHP ${{ matrix.php-version }}'

runs-on: 'ubuntu-latest'
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}

strategy:
fail-fast: false
Expand Down Expand Up @@ -130,11 +133,12 @@ jobs:
run: composer show

- name: 'Run tests with coverage'
run: phpdbg -qrr vendor/bin/phpunit --coverage-clover coverage/clover.xml
run: vendor/bin/phpunit --coverage-clover coverage/clover.xml

- name: 'Send Coverage'
continue-on-error: true
timeout-minutes: 1
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage/clover.xml
- name: 'Send Coverage to Codecov'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/clover.xml
flags: unittests
fail_ci_if_error: true
17 changes: 0 additions & 17 deletions .scrutinizer.yml

This file was deleted.

0 comments on commit 1d07e40

Please sign in to comment.