Skip to content

Commit

Permalink
Enable codecov for pghoard repository
Browse files Browse the repository at this point in the history
  • Loading branch information
alanfranz committed Mar 17, 2022
1 parent a1a5643 commit 1097636
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,9 @@ jobs:
pip install -e .
- id: unittest
run: make unittest
run: make coverage

- id: upload-codecov
uses: codecov/codecov-action@v2
with:
verbose: true
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ fmt: version

.PHONY: coverage
coverage: version
$(PYTHON) -m pytest $(PYTEST_ARG) --cov-report term-missing --cov pghoard test/
$(PYTHON) -m pytest $(PYTEST_ARG) --cov-report term-missing --cov-report xml:coverage.xml \
--cov pghoard test/

.PHONY: clean
clean:
$(RM) -r *.egg-info/ build/ dist/ rpm/
$(RM) ../pghoard_* test-*.xml $(generated)
$(RM) ../pghoard_* test-*.xml coverage.xml $(generated)

pghoard/version.py: version.py
$(PYTHON) $^ $@
Expand Down
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ PGHoard |BuildStatus|_

.. |BuildStatus| image:: https://github.com/aiven/pghoard/actions/workflows/build.yml/badge.svg?branch=main
.. _BuildStatus: https://github.com/aiven/pghoard/actions
.. image:: https://codecov.io/gh/aiven/pghoard/branch/main/graph/badge.svg?token=nLr7M7hvCx
:target: https://codecov.io/gh/aiven/pghoard

``pghoard`` is a PostgreSQL® backup daemon and restore tooling that stores backup data in cloud object stores.

Expand Down
15 changes: 15 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
coverage:
status:
project:
default:
# basic
target: auto
threshold: 0%
base: auto
# advanced settings
branches:
- main
if_ci_failed: error #success, failure, error, ignore
informational: true
only_pulls: false

0 comments on commit 1097636

Please sign in to comment.