Skip to content

Commit

Permalink
feat: Add a code coverage badge
Browse files Browse the repository at this point in the history
  • Loading branch information
navasvarela committed Sep 23, 2024
1 parent c872264 commit f47df7c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ on:
branches: "**"

permissions:
contents: read
contents: write
pull-requests: write

jobs:
build:
Expand All @@ -33,3 +34,27 @@ jobs:
- name: Test with pytest
run: |
pytest
- name: Coverage Badge
uses: tj-actions/coverage-badge-py@v2

- name: Verify Changed files
uses: tj-actions/verify-changed-files@v16
id: verify-changed-files
with:
files: coverage.svg

- name: Commit files
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add coverage.svg
git commit -m "Updated coverage.svg"
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
force_with_lease: true
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![Documentation Status](https://readthedocs.org/projects/nada-dsl/badge/?version=latest)](https://nada-dsl.readthedocs.io/en/latest/?badge=latest)
![Build Status](https://github.com/NillionNetwork/nada-dsl/actions/workflows/build.yml/badge.svg)
![PyPI - Version](https://img.shields.io/pypi/v/nada-dsl)
![Code coverage](coverage.svg)

# nada-dsl

Expand Down

0 comments on commit f47df7c

Please sign in to comment.