Skip to content

chore: add CodeRabbit review instructions and path mapping for schedu… #69

chore: add CodeRabbit review instructions and path mapping for schedu…

chore: add CodeRabbit review instructions and path mapping for schedu… #69

name: Code Coverage
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.11"
- name: Install uv
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
- name: Install dependencies
run: |
uv sync --all-extras --dev
- name: Generate Proto Files
run: uv run python generate_proto.py
- name: Run unit tests and generate coverage report
run: |
uv run pytest tests/unit \
--cov=src \
--cov-report=xml \
--cov-report=term-missing
- name: Upload coverage to Codecov
if: github.repository_owner == 'hiero-ledger'
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
fail_ci_if_error: true