diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2013-12-08 22:49:17 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-12-08 22:49:17 +0100 |
commit | 258092dd4ec39276567df4f990aa058180978c51 (patch) | |
tree | a87f5e42273e15d3ab64a53c16bd53f06ac15c60 | |
parent | a91e3a76c81fecae8ff628aba24a5c8050dd7828 (diff) | |
download | sonarqube-258092dd4ec39276567df4f990aa058180978c51.tar.gz sonarqube-258092dd4ec39276567df4f990aa058180978c51.zip |
First integration of Karma.js into Maven build (-Pjs)
-rw-r--r-- | sonar-server/karma.conf.js | 10 | ||||
-rw-r--r-- | sonar-server/pom.xml | 26 |
2 files changed, 35 insertions, 1 deletions
diff --git a/sonar-server/karma.conf.js b/sonar-server/karma.conf.js index a34f18cf6f4..269a010f7ca 100644 --- a/sonar-server/karma.conf.js +++ b/sonar-server/karma.conf.js @@ -48,8 +48,15 @@ module.exports = function(config) { }, + plugins: [ + 'karma-qunit', + 'karma-phantomjs-launcher', + 'karma-coverage', + 'karma-junit-reporter' + ], + + // test results reporter to use - // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' reporters: ['progress', 'coverage', 'junit'], @@ -62,6 +69,7 @@ module.exports = function(config) { outputFile : '../../../../target/karma/test-results.xml' }, + // WARNING - the 2 following ports should not be hardcoded in CI environments // web server port port: 9876, diff --git a/sonar-server/pom.xml b/sonar-server/pom.xml index e05d4a24015..727c49e9c28 100644 --- a/sonar-server/pom.xml +++ b/sonar-server/pom.xml @@ -594,6 +594,32 @@ </plugins> </build> </profile> + + <profile> + <!-- experimental profile --> + <id>js</id> + <build> + <plugins> + <plugin> + <groupId>com.kelveden</groupId> + <artifactId>maven-karma-plugin</artifactId> + <version>1.5</version> + <configuration> + <configFile>${basedir}/karma.conf.js</configFile> + </configuration> + <executions> + <execution> + <id>karma</id> + <goals> + <goal>start</goal> + </goals> + <phase>process-test-classes</phase> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> </profiles> </project> |