Skip to content

Commit 9fab220

Browse files
committed
Revert "always enabled whether or not in GitHub Actions workflow"
This reverts commit d3c0d24.
1 parent 07187df commit 9fab220

File tree

1 file changed

+5
-0
lines changed
  • pytest_github_actions_annotate_failures

1 file changed

+5
-0
lines changed

pytest_github_actions_annotate_failures/plugin.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import os
22

33
def pytest_runtest_logreport(report):
4+
# enable only in a workflow of GitHub Actions
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'):
7+
return
8+
49
if report.outcome != 'failed':
510
return
611

0 commit comments

Comments
 (0)