Skip to content

Commit

Permalink
codecov bot configured
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinKalema committed Jun 8, 2024
1 parent 859c82e commit 43e772a
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov codecov
- name: Run tests
run: |
pytest --cov=src/ tests/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
40 changes: 40 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
codecov:
bot:
username: 'codecov'
email: '[email protected]'

notify:
require_ci_to_pass: yes
after_n_builds: 2

coverage:
precision: 2
round: down
range: '70...100'
status:
project:
default:
target: 80%
patch:
default:
target: auto

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: yes
macro: no

comment:
layout: 'reach, diff, flags, files, footer'
behavior: default

github_checks:
annotations:
branches:
- main
paths:
- 'src/*.py'
require_changes: true

0 comments on commit 43e772a

Please sign in to comment.