Skip to content

Commit

Permalink
Merge pull request #573 from philipparndt/disable-summary-on-ghe
Browse files Browse the repository at this point in the history
  • Loading branch information
admah committed Jun 27, 2022
2 parents be2de7b + f036b8f commit 53cc317
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dist/index.js
Expand Up @@ -74623,6 +74623,7 @@ const cliParser = __nccwpck_require__(8604)()
const findYarnWorkspaceRoot = __nccwpck_require__(6748)
const debug = __nccwpck_require__(8237)('@cypress/github-action')
const { ping } = __nccwpck_require__(9390)
const { SUMMARY_ENV_VAR } = __nccwpck_require__(1327)

/**
* Parses input command, finds the tool and
Expand Down Expand Up @@ -75359,7 +75360,16 @@ const runTests = async () => {
.then(onTestsFinished, onTestsError)
}

// Summary is not available for GitHub Enterprise at the moment
const isSummaryEnabled = () => {
return process.env[SUMMARY_ENV_VAR] !== undefined
}

const generateSummary = async (testResults) => {
if (!isSummaryEnabled()) {
return testResults
}

const headers = [
{ data: 'Result', header: true },
{ data: 'Passed :white_check_mark:', header: true },
Expand Down
10 changes: 10 additions & 0 deletions index.js
Expand Up @@ -13,6 +13,7 @@ const cliParser = require('argument-vector')()
const findYarnWorkspaceRoot = require('find-yarn-workspace-root')
const debug = require('debug')('@cypress/github-action')
const { ping } = require('./src/ping')
const { SUMMARY_ENV_VAR } = require('@actions/core/lib/summary')

/**
* Parses input command, finds the tool and
Expand Down Expand Up @@ -749,7 +750,16 @@ const runTests = async () => {
.then(onTestsFinished, onTestsError)
}

// Summary is not available for GitHub Enterprise at the moment
const isSummaryEnabled = () => {
return process.env[SUMMARY_ENV_VAR] !== undefined
}

const generateSummary = async (testResults) => {
if (!isSummaryEnabled()) {
return testResults
}

const headers = [
{ data: 'Result', header: true },
{ data: 'Passed :white_check_mark:', header: true },
Expand Down

0 comments on commit 53cc317

Please sign in to comment.