Skip to content

Commit

Permalink
Added coverage badge? (#10)
Browse files Browse the repository at this point in the history
Added coverage badge
  • Loading branch information
micahjohnson150 authored Sep 6, 2023
1 parent b9fbda9 commit 1b5afa1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,21 @@ jobs:
run: |
sudo apt-get update
python -m pip install --upgrade pip
python -m pip install pytest
python -m pip install pytest coverage
python setup.py install
- name: Test with pytest
run: |
pytest -s ./tests/
- name: Run coverage
run: |
coverage run --source study_lyte -m pytest
coverage json
# Add this
- name: Update Coverage Badge
# GitHub actions: default branch variable
# https://stackoverflow.com/questions/64781462/github-actions-default-branch-variable
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
uses: we-cli/coverage-badge-action@main
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Study Lyte
.. image:: https://github.com/AdventureData/study_lyte/actions/workflows/build.yml/badge.svg
:target: https://github.com/AdventureData/study_lyte/actions/workflows/build.yml

.. image:: https://github.com/AdventureData/study_lyte/badges/coverage.svg
:target: https://github.com/AdventureData/study_lyte/actions/workflows/testing.yml

Welcome to Adventure Data's python package for doing analysis with data from the Lyte Probe.
The Lyte probe is a smart ski pole designed to measure snow. It measures NIR and Force simulataneously along with
Expand Down
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jupyterlab==3.6.1
pytest==6.2.4
matplotlib
nbconvert

coverage

0 comments on commit 1b5afa1

Please sign in to comment.