Skip to content

Commit 014b906

Browse files
Merge pull request #18 from codecov/th/e2e-final
Th/e2e final
2 parents 1bf5553 + 57e2f14 commit 014b906

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,17 @@ jobs:
77
id-token: write
88
steps:
99
- name: Checkout
10-
uses: actions/checkout@v4
11-
- name: Set up Python 3.10
12-
uses: actions/setup-python@v4
10+
uses: actions/checkout@v5
11+
- name: Set up Python 3.11
12+
uses: actions/setup-python@v6
1313
with:
14-
python-version: '3.10'
14+
python-version: '3.11'
1515
- name: Install dependencies
1616
run: pip install -r requirements.txt
1717
- name: Run tests and collect coverage
1818
run: pytest --cov app --junitxml=junit.xml -o junit_family=legacy
1919
- name: Upload test results to Codecov
2020
if: ${{ !cancelled() }}
21-
run: |
22-
pip install sentry-prevent-cli
23-
sentry-prevent-cli -v upload --report-type test-results
21+
uses: getsentry/prevent-action@v0
2422
env:
2523
PREVENT_TOKEN: ${{ secrets.PREVENT_TOKEN }}

app/test_calculator.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
1+
import random
2+
import time
3+
14
from .calculator import Calculator
25

36

7+
def test_flaky():
8+
assert random.random() <= 0.8
9+
10+
def test_fail_1():
11+
assert True is False
12+
13+
def test_fail_2():
14+
assert True is False
15+
16+
def test_fail_3():
17+
assert True is False
18+
19+
def test_slow():
20+
time.sleep(5)
21+
422
def test_add():
523
assert Calculator.add(1, 2) == 3.0
624
assert Calculator.add(1.0, 2.0) == 3.0

0 commit comments

Comments
 (0)