Skip to content

chore: update codecov configuration #3072

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 2 commits into from
Feb 19, 2021
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
7 changes: 6 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
codecov:
require_ci_to_pass: no
notify:
wait_for_ci: no

coverage:
status:
patch:
Expand All @@ -7,7 +12,7 @@ coverage:
default:
target: auto
threshold: 2%

comment:
layout: diff, flags, files
require_changes: true

3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
Comment on lines +63 to +64
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is needed for codecov to be able to detect correct commit SHA

==> GitHub Actions detected.
-> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you set it to 0?

Copy link
Collaborator Author

@armano2 armano2 Feb 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could but its better not to, fetching only 1 (in this case 2) commit is huge boost to time of git fetch/clone

this property is used to tell git how many commit we want to fetch


- name: echo github.ref
run: echo ${{ github.ref }}
Expand Down Expand Up @@ -142,7 +144,6 @@ jobs:
- name: Publish code coverage report
uses: codecov/codecov-action@v1
with:
yml: ./codecov.yml
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittest
name: codecov
Expand Down