Skip to content

Commit

Permalink
Merge pull request LLNL#139 from TauferLab/codecov
Browse files Browse the repository at this point in the history
Adds code coverage through Codecov
  • Loading branch information
pearce8 authored May 9, 2024
2 parents 68455ca + deebd23 commit db283eb
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@ jobs:
run: |
pip install extrap
- name: Install coverage tools
run: |
pip install codecov
pip install pytest-cov
- name: Basic Test with pytest
run: |
PYTHONPATH=. $(which pytest)
PYTHONPATH=. $(which pytest) --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
directory: ./coverage/reports/
env_vars: OS,PYTHON
files: /home/runner/work/thicket/thicket/coverage.xml
flags: unittests
verbose: true
fail_ci_if_error: true
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# <img src="https://raw.githubusercontent.com/llnl/thicket/develop/logo-notext.png" width="64" valign="middle" alt="thicket"/> Thicket

[![Build Status](https://github.com/llnl/thicket/actions/workflows/unit-tests.yaml/badge.svg)](https://github.com/llnl/thicket/actions)
[![codecov.io](https://codecov.io/github/LLNL/thicket/coverage.svg?branch=develop)](https://codecov.io/github/LLNL/thicket?branch=develop)
[![Read the Docs](http://readthedocs.org/projects/thicket/badge/?version=latest)](http://thicket.readthedocs.io)
[![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Expand Down
11 changes: 11 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
coverage:
round: down
range: "65...100"

comment:
layout: "header, diff, changes, tree"
behavior: new
require_changes: false
require_base: false
require_head: true
after_n_builds: 4

0 comments on commit db283eb

Please sign in to comment.