Last active
February 5, 2019 19:47
-
-
Save nichoth/ad9fcbe9c0ca8513d2c8f76a7729de6c to your computer and use it in GitHub Desktop.
cypress + budo (browserify) in a CI server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cypress = require('cypress') | |
var Budo = require('budo') | |
var getPort = require('getport') | |
getPort(9966, function (err, port) { | |
if (err) throw err | |
var budo = Budo.cli(process.argv.slice(2), { | |
port | |
}).on('connect', function () { | |
cypress.run({ | |
config: { | |
baseUrl: 'http://localhost:' + port | |
} | |
}).then(res => { | |
if (res.totalFailed > 0) process.exit(1) | |
budo.close() | |
}) | |
}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"cypress-ci": "node ./cypress/scripts/ci.js src/index.js:bundle.js --pushstate --dir=public -- -t babelify -g aliasify -t [ envify --NODE_ENV development ] -dv" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that args for budo/browserify are passed in via cli