mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Merge pull request #6248 from as-cii/as-public-ci
Public Continuous Integration
This commit is contained in:
26
.travis.yml
Normal file
26
.travis.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
git:
|
||||
depth: 10
|
||||
|
||||
env:
|
||||
- NODE_VERSION=0.10
|
||||
- NODE_VERSION=0.12
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
install:
|
||||
- git clone https://github.com/creationix/nvm.git /tmp/.nvm
|
||||
- source /tmp/.nvm/nvm.sh
|
||||
- nvm install $NODE_VERSION
|
||||
- nvm use $NODE_VERSION
|
||||
- if [ $TRAVIS_OS_NAME == "linux" ]; then
|
||||
sudo apt-get install build-essential git libgnome-keyring-dev fakeroot;
|
||||
fi
|
||||
|
||||
script: script/cibuild
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: change
|
||||
@@ -227,8 +227,8 @@ module.exports = (grunt) ->
|
||||
ciTasks.push('mkdeb') if process.platform is 'linux'
|
||||
ciTasks.push('create-windows-installer') if process.platform is 'win32'
|
||||
ciTasks.push('test') if process.platform is 'darwin'
|
||||
ciTasks.push('codesign')
|
||||
ciTasks.push('publish-build')
|
||||
ciTasks.push('codesign') unless process.env.TRAVIS
|
||||
ciTasks.push('publish-build') unless process.env.TRAVIS
|
||||
grunt.registerTask('ci', ciTasks)
|
||||
|
||||
defaultTasks = ['download-atom-shell', 'download-atom-shell-chromedriver', 'build', 'set-version', 'generate-asar']
|
||||
|
||||
@@ -12,7 +12,7 @@ module.exports = (grunt) ->
|
||||
packageSpecQueue = null
|
||||
|
||||
logDeprecations = (label, {stderr}={}) ->
|
||||
return unless process.env.JANKY_SHA1
|
||||
return unless process.env.JANKY_SHA1 or process.env.CI
|
||||
stderr ?= ''
|
||||
deprecatedStart = stderr.indexOf('Calls to deprecated functions')
|
||||
return if deprecatedStart is -1
|
||||
@@ -60,7 +60,7 @@ module.exports = (grunt) ->
|
||||
cwd: packagePath
|
||||
env: _.extend({}, process.env, ATOM_PATH: rootDir)
|
||||
|
||||
grunt.verbose.writeln "Launching #{path.basename(packagePath)} specs."
|
||||
grunt.log.ok "Launching #{path.basename(packagePath)} specs."
|
||||
spawn options, (error, results, code) ->
|
||||
if process.platform is 'win32'
|
||||
if error
|
||||
@@ -104,13 +104,14 @@ module.exports = (grunt) ->
|
||||
ATOM_INTEGRATION_TESTS_ENABLED: true
|
||||
)
|
||||
|
||||
grunt.log.ok "Launching core specs."
|
||||
spawn options, (error, results, code) ->
|
||||
if process.platform is 'win32'
|
||||
process.stderr.write(fs.readFileSync('ci.log')) if error
|
||||
fs.unlinkSync('ci.log')
|
||||
else
|
||||
# TODO: Restore concurrency on Windows
|
||||
packageSpecQueue.concurrency = concurrency
|
||||
packageSpecQueue?.concurrency = concurrency
|
||||
logDeprecations('Core Specs', results)
|
||||
|
||||
callback(null, error)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
path = require "path"
|
||||
http = require "http"
|
||||
temp = require("temp").track()
|
||||
remote = require "remote"
|
||||
async = require "async"
|
||||
@@ -11,6 +12,19 @@ AtomLauncherPath = path.join(__dirname, "..", "helpers", "atom-launcher.sh")
|
||||
ChromedriverPath = path.resolve(__dirname, '..', '..', '..', 'atom-shell', 'chromedriver', 'chromedriver')
|
||||
SocketPath = path.join(temp.mkdirSync("socket-dir"), "atom-#{process.env.USER}.sock")
|
||||
ChromedriverPort = 9515
|
||||
ChromedriverURLBase = "/wd/hub"
|
||||
ChromedriverStatusURL = "http://localhost:#{ChromedriverPort}#{ChromedriverURLBase}/status"
|
||||
|
||||
pollChromeDriver = (done) ->
|
||||
checkStatus = ->
|
||||
http.get(ChromedriverStatusURL, (response) ->
|
||||
if response.statusCode is 200
|
||||
done()
|
||||
else
|
||||
pollChromeDriver(done)
|
||||
).on("error", -> pollChromeDriver(done))
|
||||
|
||||
setTimeout(checkStatus, 100)
|
||||
|
||||
buildAtomClient = (args, env) ->
|
||||
client = webdriverio.remote(
|
||||
@@ -110,7 +124,7 @@ module.exports = (args, env, fn) ->
|
||||
chromedriver = spawn(ChromedriverPath, [
|
||||
"--verbose",
|
||||
"--port=#{ChromedriverPort}",
|
||||
"--url-base=/wd/hub"
|
||||
"--url-base=#{ChromedriverURLBase}"
|
||||
])
|
||||
|
||||
chromedriverLogs = []
|
||||
@@ -123,7 +137,7 @@ module.exports = (args, env, fn) ->
|
||||
chromedriver.stderr.on "close", ->
|
||||
resolve(errorCode)
|
||||
|
||||
waits(100)
|
||||
waitsFor("webdriver to start", pollChromeDriver, 15000)
|
||||
|
||||
waitsFor("webdriver to finish", (done) ->
|
||||
finish = once ->
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
#
|
||||
# ATOM_INTEGRATION_TESTS_ENABLED=true apm test
|
||||
return unless process.env.ATOM_INTEGRATION_TESTS_ENABLED
|
||||
# Integration tests require a fast machine and, for now, we cannot afford to
|
||||
# run them on Travis.
|
||||
return if process.env.TRAVIS
|
||||
|
||||
fs = require "fs"
|
||||
path = require "path"
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports.runSpecSuite = (specSuite, logFile, logErrors=true) ->
|
||||
|
||||
{TerminalReporter} = require 'jasmine-tagged'
|
||||
|
||||
disableFocusMethods() if process.env.JANKY_SHA1
|
||||
disableFocusMethods() if process.env.JANKY_SHA1 or process.env.CI
|
||||
|
||||
TimeReporter = require './time-reporter'
|
||||
timeReporter = new TimeReporter()
|
||||
|
||||
@@ -51,7 +51,7 @@ Object.defineProperty document, 'title',
|
||||
|
||||
jasmine.getEnv().addEqualityTester(_.isEqual) # Use underscore's definition of equality for toEqual assertions
|
||||
|
||||
if process.env.JANKY_SHA1 and process.platform is 'win32'
|
||||
if process.env.CI
|
||||
jasmine.getEnv().defaultTimeoutInterval = 60000
|
||||
else
|
||||
jasmine.getEnv().defaultTimeoutInterval = 5000
|
||||
|
||||
Reference in New Issue
Block a user