File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ async function install(arg) {
126126 }
127127}
128128
129- async function verify ( arg ) {
129+ async function cypressVerify ( arg ) {
130130 debug ( 'verifying Cypress can run' )
131131 try {
132132 await arg . utils . run ( 'cypress' , [ 'verify' ] )
@@ -140,6 +140,20 @@ async function verify(arg) {
140140 }
141141}
142142
143+ async function cypressInfo ( arg ) {
144+ debug ( 'Cypress info' )
145+ try {
146+ await arg . utils . run ( 'cypress' , [ 'info' ] )
147+ } catch ( error ) {
148+ debug ( 'error in Cypress info command: %s' , error . message )
149+ const buildUtils = arg . utils . build
150+ console . error ( '' )
151+ console . error ( 'Failed to run Cypress info' )
152+ console . error ( '' )
153+ buildUtils . failBuild ( 'Failed Cypress info' , { error } )
154+ }
155+ }
156+
143157const processCypressResults = ( results , buildUtils ) => {
144158 if ( results . failures ) {
145159 // Cypress failed without even running the tests
@@ -199,7 +213,8 @@ const hasRecordKey = () => typeof process.env.CYPRESS_RECORD_KEY === 'string'
199213module . exports = {
200214 onPreBuild : async ( arg ) => {
201215 await install ( arg )
202- await verify ( arg )
216+ await cypressVerify ( arg )
217+ await cypressInfo ( arg )
203218
204219 debug ( 'cypress plugin preBuild inputs %o' , arg . inputs )
205220 const preBuildInputs = arg . inputs && arg . inputs . preBuild
You can’t perform that action at this time.
0 commit comments