Skip to content

Commit 3a7eedd

Browse files
committed
fix GITHUB_ACTIONS value
1 parent ca304ba commit 3a7eedd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

plugin_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def test_success():
1111
assert 1
1212
'''
1313
)
14-
testdir.monkeypatch.setenv('GITHUB_ACTIONS', '1')
14+
testdir.monkeypatch.setenv('GITHUB_ACTIONS', 'true')
1515
testdir._method = 'subprocess'
1616
result = testdir.runpytest()
1717
result.stdout.no_fnmatch_line(
@@ -28,7 +28,7 @@ def test_fail():
2828
assert 0
2929
'''
3030
)
31-
testdir.monkeypatch.setenv('GITHUB_ACTIONS', '1')
31+
testdir.monkeypatch.setenv('GITHUB_ACTIONS', 'true')
3232
testdir._method = 'subprocess'
3333
result = testdir.runpytest()
3434
result.stdout.fnmatch_lines([
@@ -46,7 +46,7 @@ def test_fail():
4646
assert 1
4747
'''
4848
)
49-
testdir.monkeypatch.setenv('GITHUB_ACTIONS', '1')
49+
testdir.monkeypatch.setenv('GITHUB_ACTIONS', 'true')
5050
testdir._method = 'subprocess'
5151
result = testdir.runpytest()
5252
result.stdout.fnmatch_lines([

pytest_github_actions_annotate_failures/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
def pytest_runtest_logreport(report):
44
# enable only in a workflow of GitHub Actions
55
# 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':
77
return
88

99
if report.outcome != 'failed':

0 commit comments

Comments
 (0)