diff --git a/package.json b/package.json index 79331e0..a18d3b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jest-github-actions-reporter", - "version": "1.0.3", + "version": "1.1.0", "description": "Reporter for Jest that outputs GitHub Actions annotations", "main": "dist/index.js", "scripts": { diff --git a/src/index.ts b/src/index.ts index 66f2952..df8f6b8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -15,6 +15,10 @@ class GitHubActionsReporter implements jest.Reporter { contexts: Set, results: jest.AggregatedResult ) { + if (process.env.GITHUB_ACTIONS !== 'true') { + return; + } + issue("group", "Jest Annotations"); if (results.numFailedTests > 0) {