Skip to content

Commit cf3191b

Browse files
committed
ci: add coverage workflow and Codecov badge
1 parent f458588 commit cf3191b

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

‎.coverage‎

52 KB
Binary file not shown.

‎.github/workflows/coverage.yml‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Coverage
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
coverage:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v7.0.1
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.13"
17+
- name: Install dependencies
18+
run: |
19+
pip install -r requirements.txt
20+
pip install pytest pytest-cov
21+
- name: Run tests with coverage
22+
run: |
23+
pytest --cov=main --cov-report=xml --cov-report=term-missing main_test.py
24+
- name: Upload coverage to Codecov
25+
uses: codecov/codecov-action@v7
26+
with:
27+
files: ./coverage.xml
28+
flags: unittests
29+
name: codecov-umbrella
30+
fail_ci_if_error: true

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[![GitHub marketplace](https://img.shields.io/badge/Marketplace-commit--check--action-blue)](https://github.com/marketplace/actions/commit-check-action)
66
[![commit-check](https://img.shields.io/badge/commit--check-enabled-brightgreen?logo=Git&logoColor=white&color=%232c9ccd)](https://github.com/commit-check/commit-check)
77
[![slsa-badge](https://slsa.dev/images/gh-badge-level3.svg?color=blue)](https://github.com/commit-check/commit-check-action/blob/a2873ca0482dd505c93fb51861c953e82fd0a186/action.yml#L59-L69)
8+
[![codecov](https://codecov.io/gh/commit-check/commit-check-action/graph/badge.svg?token=G3R0LFO0YF)](https://codecov.io/gh/commit-check/commit-check-action)
89

910
A GitHub Action for checking commit message formatting, branch naming, committer name, email, commit signoff, and more.
1011

0 commit comments

Comments
 (0)