File tree Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Original file line number Diff line number Diff line change 7
7
id-token : write
8
8
steps :
9
9
- 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
13
13
with :
14
- python-version : ' 3.10 '
14
+ python-version : ' 3.11 '
15
15
- name : Install dependencies
16
16
run : pip install -r requirements.txt
17
17
- name : Run tests and collect coverage
18
18
run : pytest --cov app --junitxml=junit.xml -o junit_family=legacy
19
19
- name : Upload test results to Codecov
20
20
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
24
22
env :
25
23
PREVENT_TOKEN : ${{ secrets.PREVENT_TOKEN }}
Original file line number Diff line number Diff line change
1
+ import random
2
+ import time
3
+
1
4
from .calculator import Calculator
2
5
3
6
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
+
4
22
def test_add ():
5
23
assert Calculator .add (1 , 2 ) == 3.0
6
24
assert Calculator .add (1.0 , 2.0 ) == 3.0
You can’t perform that action at this time.
0 commit comments