Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,35 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Test calculator
run: |
coverage run -m pytest tests/test_calculator.py
coverage xml
- uses: codecov/codecov-action@v1
with:
flags: calculator

- name: Test smiles
run: |
coverage run -m pytest tests/test_smiles.py
coverage xml
- uses: codecov/codecov-action@v1
with:
flags: smiles

- name: Test smiles
run: |
coverage run -m pytest tests/test_auth.py
coverage xml
- uses: codecov/codecov-action@v1
with:
flags: auth

- name: Test old features together
run: |
coverage run -m pytest tests/test_calculator.py tests/test_smiles.py
coverage xml
- uses: codecov/codecov-action@v1
with:
flags: old-features
40 changes: 22 additions & 18 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,32 @@ coverage:
status:
project:
default:
target: 50%
calculator:
target: 100%
flags:
- calculator
smiles:
target: 75%
flags:
- smiles
target: 83.33%
patch:
default:
target: 100%
target: 75%

flags:
calculator:
paths:
- calculator/
carryforward: true
smiles:
paths:
- smiles/
flag_management:
default_rules:
carryforward: true
statuses:
- name_prefix: proj-
type: project
target: 75%
threshold: 1%
- name_prefix: patch-
type: patch
target: 75%
individual_flags:
- name: old_features
paths:
- smiles/
- calculator/
carryforward: true
statuses:
- name_prefix: proj-
type: project
target: 87.5%

ignore:
- tests/*
Empty file added new_feature/__init__.py
Empty file.
6 changes: 6 additions & 0 deletions new_feature/auth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def login():
return True


def logout():
return True
1 change: 1 addition & 0 deletions smiles/smiles.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
def smile():
return ":)"


def frown():
return ":("
5 changes: 5 additions & 0 deletions tests/test_auth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from new_feature import auth


def test_login():
assert auth.login() is True