File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -74623,6 +74623,7 @@ const cliParser = __nccwpck_require__(8604)()
74623
74623
const findYarnWorkspaceRoot = __nccwpck_require__(6748)
74624
74624
const debug = __nccwpck_require__(8237)('@cypress/github-action')
74625
74625
const { ping } = __nccwpck_require__(9390)
74626
+ const { SUMMARY_ENV_VAR } = __nccwpck_require__(1327)
74626
74627
74627
74628
/**
74628
74629
* Parses input command, finds the tool and
@@ -75359,7 +75360,16 @@ const runTests = async () => {
75359
75360
.then(onTestsFinished, onTestsError)
75360
75361
}
75361
75362
75363
+ // Summary is not available for GitHub Enterprise at the moment
75364
+ const isSummaryEnabled = () => {
75365
+ return process.env[SUMMARY_ENV_VAR] !== undefined
75366
+ }
75367
+
75362
75368
const generateSummary = async (testResults) => {
75369
+ if (!isSummaryEnabled()) {
75370
+ return testResults
75371
+ }
75372
+
75363
75373
const headers = [
75364
75374
{ data: 'Result', header: true },
75365
75375
{ data: 'Passed :white_check_mark:', header: true },
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ const cliParser = require('argument-vector')()
13
13
const findYarnWorkspaceRoot = require ( 'find-yarn-workspace-root' )
14
14
const debug = require ( 'debug' ) ( '@cypress/github-action' )
15
15
const { ping } = require ( './src/ping' )
16
+ const { SUMMARY_ENV_VAR } = require ( '@actions/core/lib/summary' )
16
17
17
18
/**
18
19
* Parses input command, finds the tool and
@@ -749,7 +750,16 @@ const runTests = async () => {
749
750
. then ( onTestsFinished , onTestsError )
750
751
}
751
752
753
+ // Summary is not available for GitHub Enterprise at the moment
754
+ const isSummaryEnabled = ( ) => {
755
+ return process . env [ SUMMARY_ENV_VAR ] !== undefined
756
+ }
757
+
752
758
const generateSummary = async ( testResults ) => {
759
+ if ( ! isSummaryEnabled ( ) ) {
760
+ return testResults
761
+ }
762
+
753
763
const headers = [
754
764
{ data : 'Result' , header : true } ,
755
765
{ data : 'Passed :white_check_mark:' , header : true } ,
You can’t perform that action at this time.
0 commit comments