Skip to content

Commit

Permalink
updated coverage badge in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
maniospas committed Jun 5, 2024
1 parent b4aea4d commit 040fa9f
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install coverage-badge
pip install scikit-learn
pip install scipy
pip install numpy
Expand All @@ -42,17 +43,8 @@ jobs:
pytest -x --cov=pygrank --cov-report=xml tests/test_autorefs.py tests/test_core.py tests/test_measures.py tests/test_filters.py tests/test_autotune.py tests/test_filter_optimization.py tests/test_gnn.py tests/test_postprocessing.py tests/test_benchmarks.py tests/test_fairness.py tests/test_preprocessor.py
- name: Generate coverage badge
run: coverage-badge -o coverage.svg -f
- name: Commit coverage badge
if: ${{ matrix.python-version == '3.11' }}
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add coverage.svg
if [ -n "$(git status --porcelain)" ]; then
git commit -m 'Updated coverage badge'
git push
else
echo "No changes in coverage to commit"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload coverage badge
uses: actions/upload-artifact@v4
with:
name: coverage-badge
path: coverage.svg

0 comments on commit 040fa9f

Please sign in to comment.