Skip to content

Commit 040fa9f

Browse files
committed
updated coverage badge in actions
1 parent b4aea4d commit 040fa9f

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

.github/workflows/tests.yml

+6-14
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- name: Install dependencies
2424
run: |
2525
python -m pip install --upgrade pip
26+
pip install coverage-badge
2627
pip install scikit-learn
2728
pip install scipy
2829
pip install numpy
@@ -42,17 +43,8 @@ jobs:
4243
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
4344
- name: Generate coverage badge
4445
run: coverage-badge -o coverage.svg -f
45-
- name: Commit coverage badge
46-
if: ${{ matrix.python-version == '3.11' }}
47-
run: |
48-
git config --global user.name 'github-actions'
49-
git config --global user.email '[email protected]'
50-
git add coverage.svg
51-
if [ -n "$(git status --porcelain)" ]; then
52-
git commit -m 'Updated coverage badge'
53-
git push
54-
else
55-
echo "No changes in coverage to commit"
56-
fi
57-
env:
58-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
- name: Upload coverage badge
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: coverage-badge
50+
path: coverage.svg

0 commit comments

Comments
 (0)