mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-19 23:17:16 +03:00
Implement test task using grunt shell
This prevents duplicate messages in the CI build logs.
This commit is contained in:
parent
c27103db8a
commit
d9c62a76bf
@ -145,6 +145,20 @@ module.exports = (grunt) ->
|
||||
_.extend(context, parsed.attributes)
|
||||
parsed.body
|
||||
|
||||
shell:
|
||||
'kill-atom':
|
||||
command: 'pkill Atom'
|
||||
options:
|
||||
stdout: false
|
||||
stderr: false
|
||||
failOnError: false
|
||||
|
||||
test:
|
||||
command: "#{path.join(contentsDir, 'MacOS', 'Atom')} --test --resource-path=#{__dirname}"
|
||||
options:
|
||||
stdout: false
|
||||
stderr: false
|
||||
callback: (error, stdout, stderr) -> grunt.warn('Specs failed')
|
||||
|
||||
grunt.loadNpmTasks('grunt-coffeelint')
|
||||
grunt.loadNpmTasks('grunt-lesslint')
|
||||
@ -153,10 +167,12 @@ module.exports = (grunt) ->
|
||||
grunt.loadNpmTasks('grunt-contrib-coffee')
|
||||
grunt.loadNpmTasks('grunt-contrib-less')
|
||||
grunt.loadNpmTasks('grunt-markdown')
|
||||
grunt.loadNpmTasks('grunt-shell')
|
||||
grunt.loadTasks('tasks')
|
||||
|
||||
grunt.registerTask('compile', ['coffee', 'less', 'cson'])
|
||||
grunt.registerTask('lint', ['coffeelint', 'csslint', 'lesslint'])
|
||||
grunt.registerTask('test', ['shell:kill-atom', 'shell:test'])
|
||||
grunt.registerTask('ci', ['lint', 'partial-clean', 'update-atom-shell', 'build', 'set-development-version', 'test'])
|
||||
grunt.registerTask('deploy', ['partial-clean', 'update-atom-shell', 'build', 'codesign'])
|
||||
grunt.registerTask('docs', ['markdown:guides', 'build-docs'])
|
||||
|
@ -34,7 +34,6 @@
|
||||
"tantamount": "0.3.0",
|
||||
"temp": "0.5.0",
|
||||
"underscore": "1.4.4",
|
||||
|
||||
"archive-view": "0.3.0",
|
||||
"autocomplete": "0.3.0",
|
||||
"autoflow": "0.1.0",
|
||||
@ -67,7 +66,6 @@
|
||||
"tree-view": "0.2.0",
|
||||
"whitespace": "0.1.0",
|
||||
"wrap-guide": "0.1.0",
|
||||
|
||||
"c-tmbundle": "1.0.0",
|
||||
"coffee-script-tmbundle": "4.0.0",
|
||||
"css-tmbundle": "1.0.0",
|
||||
@ -115,7 +113,8 @@
|
||||
"ws": "0.4.27",
|
||||
"js-yaml": "~2.1.0",
|
||||
"grunt-markdown": "~0.4.0",
|
||||
"json-front-matter": "~0.1.3"
|
||||
"json-front-matter": "~0.1.3",
|
||||
"grunt-shell": "~0.3.1"
|
||||
},
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -1,15 +0,0 @@
|
||||
path = require 'path'
|
||||
|
||||
module.exports = (grunt) ->
|
||||
{spawn} = require('./task-helpers')(grunt)
|
||||
|
||||
grunt.registerTask 'test', 'Run the specs', ->
|
||||
done = @async()
|
||||
commands = []
|
||||
commands.push (callback) ->
|
||||
spawn cmd: 'pkill', args: ['Atom'], -> callback()
|
||||
commands.push (callback) ->
|
||||
atomBinary = path.join(grunt.config.get('atom.contentsDir'), 'MacOS', 'Atom')
|
||||
resourcePath = path.resolve(__dirname, '..')
|
||||
spawn cmd: atomBinary, args: ['--test', "--resource-path=#{resourcePath}"], (error) -> callback(error)
|
||||
grunt.util.async.waterfall commands, (error) -> done(error)
|
Loading…
Reference in New Issue
Block a user