StackStorm / orquestaconvert

Converts Mistral workflows into Orchestra workflows
Apache License 2.0
13 stars 7 forks source link

Add make target to report test coverage #12

Closed blag closed 5 years ago

blag commented 5 years ago

This adds a make target to report coverage of test modules. Coverage reports in CI usually only coverage the user-facing code. This includes developer-facing code as well.

Here's a sample report:

TEST RESULT OUTPUT:

Name                                      Stmts   Miss  Cover
-------------------------------------------------------------
orquestaconvert/__init__.py                   1      0   100%
orquestaconvert/client.py                    38      1    97%
orquestaconvert/expressions/__init__.py      52      0   100%
orquestaconvert/expressions/base.py          13      0   100%
orquestaconvert/expressions/jinja.py         34      0   100%
orquestaconvert/expressions/yaql.py          34      0   100%
orquestaconvert/utils/__init__.py             0      0   100%
orquestaconvert/utils/type_utils.py           2      0   100%
orquestaconvert/utils/yaml_utils.py          21      0   100%
orquestaconvert/workflows/__init__.py         0      0   100%
orquestaconvert/workflows/base.py           148      0   100%
tests/__init__.py                             0      0   100%
tests/base_test_case.py                      40      2    95%
tests/integration/__init__.py                 0      0   100%
tests/integration/test_end_to_end.py         36      0   100%
tests/unit/__init__.py                        0      0   100%
tests/unit/test_client.py                    33      0   100%
tests/unit/test_expressions.py              122      0   100%
tests/unit/test_expressions_base.py          13      0   100%
tests/unit/test_expressions_jinja.py         44      0   100%
tests/unit/test_expressions_yaql.py          48      0   100%
tests/unit/test_utils_type_utils.py           8      0   100%
tests/unit/test_utils_yaml_utils.py          27      0   100%
tests/unit/test_workflows.py                220      0   100%
-------------------------------------------------------------
TOTAL                                       934      3    99%
-----------------------------------------------------------------------------
99 tests run in 0.601 seconds (99 tests passed)

I don't think this needs to be integrated into CI, but it's useful for developers to check that their tests are all being run.

codecov-io commented 5 years ago

Codecov Report

Merging #12 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #12   +/-   ##
======================================
  Coverage    99.7%   99.7%           
======================================
  Files           9       9           
  Lines         343     343           
======================================
  Hits          342     342           
  Misses          1       1

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 444f535...aa84fe0. Read the comment docs.