|
|
@@ -20,6 +20,8 @@ module.exports = (grunt) ->
|
|
|
grunt.loadNpmTasks 'grunt-parallel'
|
|
|
grunt.loadNpmTasks 'grunt-exec'
|
|
|
grunt.loadNpmTasks 'grunt-postcss'
|
|
|
+ grunt.loadNpmTasks 'grunt-forever'
|
|
|
+ grunt.loadNpmTasks 'grunt-shell'
|
|
|
# grunt.loadNpmTasks 'grunt-contrib-imagemin'
|
|
|
# grunt.loadNpmTasks 'grunt-sprity'
|
|
|
|
|
|
@@ -31,6 +33,10 @@ module.exports = (grunt) ->
|
|
|
cssmin:
|
|
|
command:"node_modules/clean-css/bin/cleancss --s0 -o public/stylesheets/style.css public/stylesheets/style.css"
|
|
|
|
|
|
+ forever:
|
|
|
+ app:
|
|
|
+ options:
|
|
|
+ index: "app.js"
|
|
|
|
|
|
watch:
|
|
|
coffee:
|
|
|
@@ -244,8 +250,11 @@ module.exports = (grunt) ->
|
|
|
pattern: "@@RELEASE@@"
|
|
|
replacement: process.env.BUILD_NUMBER || "(unknown build)"
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+ shell:
|
|
|
+ fullAcceptanceTests:
|
|
|
+ command: "bash ./test/acceptance/scripts/full-test.sh"
|
|
|
+ dockerTests:
|
|
|
+ command: 'docker run -v "$(pwd):/app" --env SHARELATEX_ALLOW_PUBLIC_ACCESS=true --rm sharelatex/acceptance-test-runner'
|
|
|
|
|
|
availabletasks:
|
|
|
tasks:
|
|
|
@@ -396,6 +405,18 @@ module.exports = (grunt) ->
|
|
|
grunt.registerTask 'test:acceptance', 'Run the acceptance tests (use --grep=<regex> or --feature=<feature> for individual tests)', ['compile:acceptance_tests', 'mochaTest:acceptance']
|
|
|
grunt.registerTask 'test:smoke', 'Run the smoke tests', ['compile:smoke_tests', 'mochaTest:smoke']
|
|
|
|
|
|
+ grunt.registerTask(
|
|
|
+ 'test:acceptance:full',
|
|
|
+ "Start server and run acceptance tests",
|
|
|
+ ['shell:fullAcceptanceTests']
|
|
|
+ )
|
|
|
+
|
|
|
+ grunt.registerTask(
|
|
|
+ 'test:acceptance:docker',
|
|
|
+ "Run acceptance tests inside docker container",
|
|
|
+ ['compile:acceptance_tests', 'shell:dockerTests']
|
|
|
+ )
|
|
|
+
|
|
|
grunt.registerTask 'test:modules:unit', 'Run the unit tests for the modules', ['compile:modules:server', 'compile:modules:unit_tests'].concat(moduleUnitTestTasks)
|
|
|
|
|
|
grunt.registerTask 'run:watch', "Compile and run the web-sharelatex server", ['compile', 'env:run', 'parallel']
|