File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
pytest_github_actions_annotate_failures Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ def test_success():
11
11
assert 1
12
12
'''
13
13
)
14
- testdir .monkeypatch .setenv ('GITHUB_ACTIONS' , '1 ' )
14
+ testdir .monkeypatch .setenv ('GITHUB_ACTIONS' , 'true ' )
15
15
testdir ._method = 'subprocess'
16
16
result = testdir .runpytest ()
17
17
result .stdout .no_fnmatch_line (
@@ -28,7 +28,7 @@ def test_fail():
28
28
assert 0
29
29
'''
30
30
)
31
- testdir .monkeypatch .setenv ('GITHUB_ACTIONS' , '1 ' )
31
+ testdir .monkeypatch .setenv ('GITHUB_ACTIONS' , 'true ' )
32
32
testdir ._method = 'subprocess'
33
33
result = testdir .runpytest ()
34
34
result .stdout .fnmatch_lines ([
@@ -46,7 +46,7 @@ def test_fail():
46
46
assert 1
47
47
'''
48
48
)
49
- testdir .monkeypatch .setenv ('GITHUB_ACTIONS' , '1 ' )
49
+ testdir .monkeypatch .setenv ('GITHUB_ACTIONS' , 'true ' )
50
50
testdir ._method = 'subprocess'
51
51
result = testdir .runpytest ()
52
52
result .stdout .fnmatch_lines ([
Original file line number Diff line number Diff line change 3
3
def pytest_runtest_logreport (report ):
4
4
# enable only in a workflow of GitHub Actions
5
5
# ref: https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables
6
- if not os .environ .get ('GITHUB_ACTIONS' ):
6
+ if os .environ .get ('GITHUB_ACTIONS' ) != 'true' :
7
7
return
8
8
9
9
if report .outcome != 'failed' :
You can’t perform that action at this time.
0 commit comments