Skip to content

Commit

Permalink
Merge pull request #10 from Adal3n3/step4
Browse files Browse the repository at this point in the history
step4: add smiles
  • Loading branch information
Adal3n3 authored Apr 23, 2024
2 parents 3d59704 + 10d8629 commit adfd9f4
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ jobs:
python-version: '3.10'
- name: Install requirements
run: pip install -r api/requirements.txt
- name: Run tests and collect coverage
run: pytest --cov=api.calculator --cov-report=xml
- name: Run tests and collect coverage for calculator
run: pytest --cov=api.calculator --cov-report=xml:calculator-coverage.xml
- name: Run tests and collect coverage for smiles
run: pytest --cov=api.smiles --cov-report=xml:smiles-coverage.xml
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4.2.0
env:
Expand Down
Empty file added api/smiles/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions api/smiles/smiles.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class Smiles:
def smile():
return ":)"
def frown():
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() == ":)"
12 changes: 11 additions & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@ coverage:
project:
default:
target: 100%
threshold: 1%
threshold: 1%

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

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

0 comments on commit adfd9f4

Please sign in to comment.