Skip to content

Merge pull request #950 from sir-gon/develop #57

Merge pull request #950 from sir-gon/develop

Merge pull request #950 from sir-gon/develop #57

# yamllint disable rule:line-length
# This workflow runs make coverage/html and verifies that the coverage HTML report is generated.
# yamllint enable rule:line-length
---
name: Make Coverage HTML
env:
REPORT_DIR: "./htmlcov/"
REPORT_FILE: "index.html"
on: # yamllint disable-line rule:truthy
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
make-coverage-html:
name: "Run make coverage/html and verify coverage HTML"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.14
- name: Install tooling
run: >
sudo apt install pipenv
- name: Tooling check
run: |
python3 --version
pipenv --version
make --version
- name: Install
run: |
# Use the lockfile to install deterministic, audited dependencies
pipenv sync --dev
- name: Run coverage HTML target
run: make coverage/html
- name: Verify coverage HTML artifact
shell: bash
run: |
if [ ! -f $REPORT_DIR/$REPORT_FILE ]; then
echo "Coverage HTML file not found: $REPORT_DIR/$REPORT_FILE"
exit 1
fi
if [ ! -s $REPORT_DIR/$REPORT_FILE ]; then
echo "Coverage HTML file is empty: $REPORT_DIR/$REPORT_FILE"
exit 1
fi
- name: Upload coverage HTML artifact
uses: actions/upload-artifact@v7
with:
name: coverage-report-html
path: ${{ env.REPORT_DIR }}