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 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 }}
Original file line number Diff line number Diff line change 1+ import random
2+ import time
3+
14from .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+
422def test_add ():
523 assert Calculator .add (1 , 2 ) == 3.0
624 assert Calculator .add (1.0 , 2.0 ) == 3.0
You can’t perform that action at this time.
0 commit comments