File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,20 @@ async function install(arg) {
126
126
}
127
127
}
128
128
129
+ async function verify ( arg ) {
130
+ debug ( 'verifying Cypress can run' )
131
+ try {
132
+ await arg . utils . run ( 'cypress' , [ 'verify' ] )
133
+ } catch ( error ) {
134
+ debug ( 'error verifying Cypress: %s' , error . message )
135
+ const buildUtils = arg . utils . build
136
+ console . error ( '' )
137
+ console . error ( 'Failed to verify Cypress' )
138
+ console . error ( '' )
139
+ buildUtils . failBuild ( 'Failed to verify Cypress' , { error } )
140
+ }
141
+ }
142
+
129
143
const processCypressResults = ( results , buildUtils ) => {
130
144
if ( results . failures ) {
131
145
// Cypress failed without even running the tests
@@ -185,6 +199,7 @@ const hasRecordKey = () => typeof process.env.CYPRESS_RECORD_KEY === 'string'
185
199
module . exports = {
186
200
onPreBuild : async ( arg ) => {
187
201
await install ( arg )
202
+ await verify ( arg )
188
203
189
204
debug ( 'cypress plugin preBuild inputs %o' , arg . inputs )
190
205
const preBuildInputs = arg . inputs && arg . inputs . preBuild
You can’t perform that action at this time.
0 commit comments