Skip to content

Commit

Permalink
Try building html coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
hmpf committed Aug 11, 2023
1 parent 19df87e commit 59b03ad
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 deletions.
35 changes: 13 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,29 +71,20 @@ jobs:
- name: "Combine coverage"
run: |
set -xe
python -m coverage xml
python -m tox -e coverage-html
- name: "Upload to Codecov"
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
# Report and write to summary.
python -Im coverage report | sed 's/^/ /' >> $GITHUB_STEP_SUMMARY
package:
name: "Build & verify package"
runs-on: "ubuntu-latest"
- name: Upload HTML report
uses: actions/upload-artifact@v3
with:
name: html-report
path: htmlcov

steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "3.9"
# - name: "Upload to Codecov"
# uses: codecov/codecov-action@v1
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# fail_ci_if_error: true

- name: "Install build and twine"
run: "python -m pip install build twine"
- name: "Build package"
run: "python -m build"
- name: "List result"
run: "ls -l dist"
- name: "Check long_description"
run: "python -m twine check dist/*"
4 changes: 1 addition & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ envlist =
py{37,38,39,310,311}
coverage-html
skip_missing_interpreters = True
basepython = python3.8
basepython = python3.11
isolated_build = True

[gh-actions]
Expand All @@ -32,7 +32,6 @@ commands =
-coverage erase

[testenv:coverage-html]
basepython = python3.9
deps =
coverage
setenv =
Expand All @@ -41,7 +40,6 @@ commands =
coverage html --include="./src/*" --omit="*/test*"

[testenv:coverage-xml]
basepython = python3.9
deps =
coverage
setenv =
Expand Down

0 comments on commit 59b03ad

Please sign in to comment.