Skip to content

Commit

Permalink
try badge with gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
hovey committed Dec 18, 2024
1 parent 339634c commit e3806ab
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/covertest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ jobs:
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov coverage coverage-badge
# python -m pip install --user scipy matplotlib pybind11 pytz pyyaml
cd cli/
pip install -e .
Expand Down Expand Up @@ -62,16 +64,22 @@ jobs:

- name: Create coverage badge
run: |
pip install coverage
pip install coverage-badge
coverage xml
coverage-badge -o coverage.svg
- name: Upload badge
uses: actions/upload-artifact@v4
with:
name: coverage-badge
path: coverage.svg
path: htmlcov/

- name: Commit and push badge to gh-pages
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add coverage.svg
git commit -m "Update coverage badge" || echo "No changes to commit"
git push --force "https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" gh-pages
#- name: Generate coverage report
# run: |
Expand Down

0 comments on commit e3806ab

Please sign in to comment.