Skip to content

Commit

Permalink
move badge generation into pipeline to remove GIST dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
JAlvarezJarreta committed May 28, 2024
1 parent 32ccd92 commit f8bb467
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
coverage run -m pytest --junitxml=./reports/test-results-${{ env.PYTHON_VERSION }}.xml
coverage html -d ./reports/htmlcov
coverage xml -o ./reports/coverage.xml
genbadge coverage -i ./reports/coverage.xml -o ./reports/htmlcov/coverage-badge.svg
coverage report -m
- name: Add coverage reports
Expand All @@ -83,17 +84,6 @@ jobs:
pytest-xml-coverage-path: ./reports/coverage.xml
junitxml-path: ./reports/test-results-${{ env.PYTHON_VERSION }}.xml

- name: Create coverage badge
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 019787fcdec96f05d6c53367bbf2b949
filename: ensembl-utils_badge.json
label: Coverage
message: ${{ steps.coverage_report.outputs.coverage }}
color: ${{ steps.coverage_report.outputs.color }}

- name: Deploy documentation to GitHub Pages
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Ensembl Python general-purpose utils

[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/Ensembl/ensembl-utils/blob/main/LICENSE)
[![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/JAlvarezJarreta/019787fcdec96f05d6c53367bbf2b949/raw/ensembl-utils_badge.json)](https://ensembl.github.io/ensembl-utils/coverage)
[![Coverage](https://ensembl.github.io/ensembl-utils/coverage/coverage-badge.svg)](https://ensembl.github.io/ensembl-utils/coverage)
[![CI](https://github.com/Ensembl/ensembl-utils/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Ensembl/ensembl-utils/actions/workflows/ci.yml)

Centralise generic Python utils used by other project within Ensembl design to facilitate frequent tasks such as input file path checks, archive files IO manipulation or logging setup, among others.
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ dependencies = [
cicd = [
"black",
"coverage",
"genbadge[coverage]",
"mypy",
"pylint",
"pytest",
Expand Down

1 comment on commit f8bb467

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/ensembl/utils
   __init__.py40100% 
   archive.py300100% 
   argparse.py760100% 
   logging.py190100% 
   rloader.py450100% 
TOTAL1740100% 

Tests Skipped Failures Errors Time
38 0 💤 0 ❌ 0 🔥 0.349s ⏱️

Please sign in to comment.