Skip to content

Commit

Permalink
ci: upload coverage report to Codecov
Browse files Browse the repository at this point in the history
Uses the Codecov action. According to documentation a token is not necessary on
pull requests. But to allow the workflow to pass when running it in a fork on
simple push events, in contrast to the dcomentation we disallow it for other
repos than winft/como when not being a pull request.
  • Loading branch information
romangg committed Mar 3, 2024
1 parent af1d2af commit da56878
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,11 @@ jobs:
shell: bash
- name: Generate a code coverage report
uses: ./.github/actions/coverage
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
if: github.repository == 'winft/como' || github.event_name == 'pull_request'
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
fail_ci_if_error: true
verbose: true
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
<br>

[![Badge CI]][CI]
[![Badge Codecov]][Codecov]
[![Badge License]][License]
[![Badge SemVer]][SemVer]<br>
[![Badge REUSE]][REUSE]
Expand Down Expand Up @@ -145,6 +146,7 @@ For direct communication join our [Matrix room](https://matrix.to/#/#como:matrix
<!------------------------------------------------------------------------------------------------>
[AUR]: https://aur.archlinux.org/packages/como
[CI]: https://github.com/winft/como/actions/workflows/change.yml
[Codecov]: https://codecov.io/gh/winft/como
[License]: LICENSE
[Matrix]: https://matrix.to/#/#como:matrix.org
[REUSE]: https://api.reuse.software/info/github.com/winft/como
Expand All @@ -154,6 +156,7 @@ For direct communication join our [Matrix room](https://matrix.to/#/#como:matrix
<!-------------------------------------------- Badges -------------------------------------------->
[Badge AUR]: https://img.shields.io/aur/version/como
[Badge CI]: https://github.com/winft/como/actions/workflows/change.yml/badge.svg?event=push
[Badge Codecov]: https://codecov.io/gh/winft/como/graph/badge.svg?token=YK9NKRP7FB
[Badge License]: https://img.shields.io/github/license/winft/como
[Badge Matrix]: https://img.shields.io/matrix/como%3Amatrix.org?logo=matrix&logoColor=048cad&label=chat&labelColor=ffffff&color=048cad
[Badge REUSE]: https://api.reuse.software/badge/github.com/winft/como
Expand Down

0 comments on commit da56878

Please sign in to comment.