Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert to xml #152

Closed
wants to merge 16 commits into from
Closed
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
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,22 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run ATS
uses: codecov/codecov-ats@v0
env:
CODECOV_STATIC_TOKEN: ${{ secrets.CODECOV_STATIC_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Run tests and collect coverage
run: pytest --cov app
run: pytest --cov app ${{ env.CODECOV_ATS_TESTS_TO_RUN }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4-beta
env:
Expand Down
2 changes: 1 addition & 1 deletion app/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ def multiply(x, y):
def divide(x, y):
if y == 0:
return 'Cannot divide by 0'
return x * 1.0 / y
return x * 1.0/y
5 changes: 3 additions & 2 deletions app/test_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ def test_multiply():
assert Calculator.multiply(-4, 2.0) == -8.0

def test_divide():
# assert Calculator.divide(1, 2) == 0.5
assert Calculator.divide(1, 2) == 0.5
assert Calculator.divide(1.0, 2.0) == 0.5
assert Calculator.divide(0, 2.0) == 0
assert Calculator.divide(-4, 2.0) == -2.0
# assert Calculator.divide(2.0, 0.0) == 'Cannot divide by 0'
assert Calculator.divide(2.0, 0.0) == 'Cannot divide by 0'
assert Calculator.divide(3.0, 0.0) == 'Cannot divide by 0'
14 changes: 14 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,17 @@ profiling:

comment:
show_critical_paths: true

flag_management:
individual_flags:
- name: smart-tests
carryforward: true
carryforward_mode: "labels"
statuses:
- type: "project"
- type: "patch"

#cli:
#plugins:
#pycoverage:
#report_type: "json"
Loading