Skip to content

Commit

Permalink
Merge pull request #13 from pymeasure/coverage-badge
Browse files Browse the repository at this point in the history
Add coverage badge
  • Loading branch information
BenediktBurger authored Oct 17, 2023
2 parents af59950 + 432b680 commit b7661d7
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/pyleco_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
- name: Test for Coverage
run: pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=pyleco | tee pytest-coverage.txt
- name: Pytest Coverage Comment
id: coverageComment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
Expand All @@ -103,6 +104,32 @@ jobs:
unique-id-for-comment: python3.8
junitxml-path: ./pytest.xml
junitxml-title: Coverage Summary
- name: Check output coverage
run: |
echo "Coverage Percantage - ${{ steps.coverageComment.outputs.coverage }}"
echo "Coverage Color - ${{ steps.coverageComment.outputs.color }}"
echo "Coverage Html - ${{ steps.coverageComment.outputs.coverageHtml }}"
echo "Coverage Warnings - ${{ steps.coverageComment.outputs.warnings }}"
echo "Coverage Errors - ${{ steps.coverageComment.outputs.errors }}"
echo "Coverage Failures - ${{ steps.coverageComment.outputs.failures }}"
echo "Coverage Skipped - ${{ steps.coverageComment.outputs.skipped }}"
echo "Coverage Tests - ${{ steps.coverageComment.outputs.tests }}"
echo "Coverage Time - ${{ steps.coverageComment.outputs.time }}"
echo "Not Success Test Info - ${{ steps.coverageComment.outputs.notSuccessTestInfo }}"
- name: Create the Badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.pyleco_coverage_gist_secret }}
gistID: 7a8a7b874b62ed803eb56ca04830bede
filename: pyleco-coverage.json
label: Coverage Report
message: ${{ steps.coverageComment.outputs.coverage }}
color: ${{ steps.coverageComment.outputs.color }}
namedLogo: python
test:
name: Python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
# PyLECO
Python reference implementation of the Laboratory Experiment COntrol (LECO) protocol (https://github.com/pymeasure/leco-protocol).

The [main branch](https://github.com/pymeasure/pyleco/tree/main) contains reviewed code, which does not yet contain all necessary modules and classes.
The most recent development is in the [development branch
](https://github.com/pymeasure/pyleco/tree/development), which might contain commits with PyLECO being in a broken state.
The [stable-development branch](https://github.com/pymeasure/pyleco/tree/stable-development) contains a stable, working version of PyLECO.
Follow that branch to have always working code (as far as possible), but following the ongoing development.

Note: LECO is still under development, such that the code and API might change.

![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/bmoneke/7a8a7b874b62ed803eb56ca04830bede/raw/pyleco-coverage.json)

1 comment on commit b7661d7

@github-actions
Copy link

Choose a reason for hiding this comment

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

PyLECO Coverage

Coverage Report
FileStmtsMissCoverMissing
pyleco
   test.py61610%25–128
pyleco/core
   internal_protocols.py12120%25–70
   message.py62298%121, 148
TOTAL2117568% 

Coverage Summary

Tests Skipped Failures Errors Time
84 0 💤 0 ❌ 0 🔥 0.592s ⏱️

Please sign in to comment.