Skip to content

Commit

Permalink
add coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
luk036 committed Apr 19, 2024
1 parent 505f269 commit 271b3cc
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 42 deletions.
84 changes: 42 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,45 +81,45 @@ jobs:
pipx run --python '${{ steps.setup-python.outputs.python-path }}'
tox --installpkg '${{ needs.prepare.outputs.wheel-distribution }}'
-- -rFEx --durations 10 --color yes # pytest args
# - name: Generate coverage report
# run: pipx run coverage lcov -o coverage.lcov
# - name: Upload partial coverage report
# uses: coverallsapp/github-action@master
# with:
# path-to-lcov: coverage.lcov
# github-token: ${{ secrets.GITHUB_TOKEN }}
# flag-name: ${{ matrix.platform }} - py${{ matrix.python }}
# parallel: true
#
# finalize:
# needs: test
# runs-on: ubuntu-latest
# steps:
# - name: Finalize coverage report
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# parallel-finished: true
#
# publish:
# needs: finalize
# if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
# runs-on: ubuntu-latest
# permissions:
# contents: write
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with: {python-version: "3.11"}
# - name: Retrieve pre-built distribution files
# uses: actions/download-artifact@v3
# with: {name: python-distribution-files, path: dist/}
# - name: Publish Package
# env:
# # TODO: Set your PYPI_TOKEN as a secret using GitHub UI
# # - https://pypi.org/help/#apitoken
# # - https://docs.github.com/en/actions/security-guides/encrypted-secrets
# TWINE_REPOSITORY: pypi
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
# run: pipx run tox -e publish
- name: Generate coverage report
run: pipx run coverage lcov -o coverage.lcov
- name: Upload partial coverage report
uses: coverallsapp/github-action@master
with:
path-to-lcov: coverage.lcov
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{ matrix.platform }} - py${{ matrix.python }}
parallel: true

finalize:
needs: test
runs-on: ubuntu-latest
steps:
- name: Finalize coverage report
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

publish:
needs: finalize
if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with: { python-version: "3.11" }
- name: Retrieve pre-built distribution files
uses: actions/download-artifact@v3
with: { name: python-distribution-files, path: dist/ }
- name: Publish Package
env:
# TODO: Set your PYPI_TOKEN as a secret using GitHub UI
# - https://pypi.org/help/#apitoken
# - https://docs.github.com/en/actions/security-guides/encrypted-secrets
TWINE_REPOSITORY: pypi
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: pipx run tox -e publish
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
[![Project generated with PyScaffold](https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold)](https://pyscaffold.org/)
[![Documentation Status](https://readthedocs.org/projects/ellalgo/badge/?version=latest)](https://ellalgo.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/luk036/ellalgo/branch/main/graph/badge.svg?token=6lpjUzPavX)](https://codecov.io/gh/luk036/ellalgo)
[![Coverage Status](https://coveralls.io/repos/github/luk036/ellalgo/badge.svg?branch=main)](https://coveralls.io/github/luk036/ellalgo?branch=main)

<p align="center">
<img src="./ellipsoid-method-for-convex-optimization.svg"/>
Expand Down

0 comments on commit 271b3cc

Please sign in to comment.