Skip to content

Coverage

Coverage #6

Workflow file for this run

# This file was generated from bswck/skeleton@0.0.2rc-110-ge162cd9.
# Instead of changing this particular file, you might want to alter the template:
# https://github.com/bswck/skeleton/tree/0.0.2rc-110-ge162cd9/project/.github/workflows/%23%25%20if%20tests%20and%20public%20%25%23coverage.yml%23%25%20endif%20%25%23.jinja
# IMPORTANT!
# Pinned versions of actions and Poetry are managed in a different repository.
# Do not submit PRs to this file unless for this repo specifically.
# To change this workflow globally, submit a PR to https://github.com/bswck/skeleton.
name: "Upload Coverage"
on:
workflow_run:
workflows: ["Tests"]
types: ["completed"]
permissions:
actions: "read"
statuses: "write"
jobs:
smokeshow:
runs-on: "ubuntu-latest"
environment: "Upload Coverage"
steps:
- uses: "actions/checkout@v4"
- name: "Install Poetry"
run: "pipx install poetry==1.7.1"
- name: "Set up Python ${{matrix.python-version}}"
uses: "actions/setup-python@v5"
with:
python-version: "${{matrix.python-version}}"
cache: "poetry"
- name: "Install the project"
run: "poetry install --only=dev,dev-skeleton"
- run: "gh run download ${{github.event.workflow_run.id}} --dir .covfiles/"
env:
GH_TOKEN: "${{github.token}}"
- run: "poetry run coverage combine --append .covfiles/*"
- run: >
poetry run coverage html
--fail-under=0
--directory=.covhtml/
--show-contexts
--title "mempip coverage for ${{github.sha}}"
- run: "poetry run smokeshow upload .covhtml/"
env:
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: "Coverage {coverage-percentage}"
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 90
SMOKESHOW_GITHUB_CONTEXT: "coverage"
SMOKESHOW_GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"
SMOKESHOW_GITHUB_PR_HEAD_SHA: "${{github.event.workflow_run.head_sha}}"
SMOKESHOW_AUTH_KEY: "${{secrets.SMOKESHOW_AUTH_KEY}}"