Skip to content

Commit

Permalink
Merge pull request #4 from nora-codecov/part3
Browse files Browse the repository at this point in the history
part 3
  • Loading branch information
nora-codecov authored Sep 12, 2024
2 parents 6f1ce1d + 2440adc commit 9ff749f
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install requirements
run: pip install -r api/requirements.txt
- name: Run tests and collect coverage
run: pytest --cov=api.calculator --cov-report=xml
run: pytest --cov
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/[email protected]
with:
Expand Down
Empty file added api/smiles/__init__.py
Empty file.
6 changes: 6 additions & 0 deletions api/smiles/smiles.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class Smiles:
def smile(self):
return ":)"

def frown(self):
return ":("
4 changes: 4 additions & 0 deletions api/smiles/test_smiles.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .smiles import Smiles

def test_smile():
assert Smiles().smile() == ":)"
14 changes: 14 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,17 @@ coverage:
default:
target: 100%
threshold: 1%

comment:
layout: "condensed_header, diff, flags, components"

component_management:
individual_components:
- component_id: api-calculator # this is an identifier that should not be changed
name: calculator # this is a display name, and can be changed freely
paths:
- api/calculator/
- component_id: api-smiles # this is an identifier that should not be changed
name: smiles # this is a display name, and can be changed freely
paths:
- api/smiles/

0 comments on commit 9ff749f

Please sign in to comment.