Skip to content

Commit

Permalink
Enable codecov in codeception configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Apr 22, 2020
1 parent 7a10193 commit 7c56c98
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
codecov:
notify:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "65...90"

status:
project:
default:
# Allow the coverage to drop by threshold %, and posting a success status.
threshold: 0.5
patch:
default:
# trial operation
target: 0%
changes: no

comment:
layout: "header, diff"
behavior: default
require_changes: no

ignore:
- ".git"
- "*.yml"
- "*.json"
- "*.md"
- "*.dist"
# ignore folders and all its contents
- ".github/.*"
- "ide/.*"
- "tests/.*"
- "vendor/.*"
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ jobs:
- name: Run test suite
run: |
vendor/bin/codecept build
vendor/bin/codecept run unit --coverage-xml=coverage.xml
vendor/bin/codecept run unit --coverage-xml=coverage-${{ matrix.php-versions }}.xml
- name: Upload coverage to Codecov
if: matrix.php-versions == '7.4'
if: success()
uses: codecov/codecov-action@v1
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./tests/_output/coverage.xml
file: ./tests/_output/coverage-*.xml
4 changes: 4 additions & 0 deletions codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ actor_suffix: Tester
extensions:
enabled:
- Codeception\Extension\RunFailed
coverage:
enabled: true
include:
- src/*

0 comments on commit 7c56c98

Please sign in to comment.