Skip to content

Commit

Permalink
Merge pull request #13 from TAMULib/CI-and-coveralls-integration
Browse files Browse the repository at this point in the history
Ci and coveralls integration
  • Loading branch information
jcreel committed Jun 7, 2018
2 parents 609bbfd + 839e73e commit 5d80f79
Show file tree
Hide file tree
Showing 9 changed files with 1,094 additions and 104 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
logs/*
!.gitkeep
coverage/
dist/
node_modules/
app/node_modules
Expand All @@ -10,7 +11,6 @@ tmp
.idea
npm-debug.log
.sass-cache/
app/config/appConfig.js
app/resources/styles/*
!app/resources/styles/sass/
app/resources/scripts/*
Expand Down
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
language: node_js

node_js:
- "0.10"
- "6"

addons:
- chrome: stable

before_script:
- export DISPLAY=:99.0
Expand All @@ -10,5 +14,5 @@ before_script:
- sleep 1 # give server time to start

script:
- node_modules/.bin/karma start karma.conf.js --no-auto-watch --single-run --reporters=dots --browsers=Firefox
- node_modules/.bin/protractor e2e-tests/protractor.conf.js --browser=firefox
- npm run test-ci
- grunt
9 changes: 8 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ module.exports = function (grunt) {
files: '**/*.scss',
tasks: ['sass']
}
},
coveralls: {
options: {
debug: true,
coverageDir: 'coverage/'
}
}

});
Expand All @@ -214,8 +220,9 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-symlink');
grunt.loadNpmTasks('grunt-karma-coveralls');

grunt.registerTask('default', ['jshint', 'sass', 'symlink']);
grunt.registerTask('default', ['jshint', 'sass', 'symlink', 'coveralls']);

grunt.registerTask('watch', ['watch']);

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
[![Build Status](https://travis-ci.org/TAMULib/ProjectManagementUI.svg?branch=master)](https://travis-ci.org/TAMULib/ProjectManagementUI)
[![Coverage Status](https://coveralls.io/repos/github/TAMULib/ProjectManagementUI/badge.svg?branch=master)](https://coveralls.io/github/TAMULib/ProjectManagementUI?branch=master)

# Project Management UI
38 changes: 38 additions & 0 deletions app/config/appConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
var appConfig = {

'version': '1.0.0',

'allowAnonymous': true,

'anonymousRole': 'ROLE_ANONYMOUS',

// Set this to the webService if mocking AuthService

'authService': 'https://labs.library.tamu.edu/auth3',
'webService': 'http://localhost:9000',

'storageType': 'session',

'logging': {
'log': true,
'info': true,
'warn': true,
'error': true,
'debug': true
},

'stompDebug': false,

/*
Determines the type of connection stomp will attempt to make with the service.
TYPES: websocket, xhr-streaming, xdr-streaming, eventsource, iframe-eventsource,
htmlfile, iframe-htmlfile, xhr-polling, xdr-polling, iframe-xhr-polling,
jsonp-polling
*/
'sockJsConnectionType': ['websocket', 'xhr-streaming', 'xhr-polling', 'xdr-streaming', 'xdr-polling', 'iframe-eventsource', 'iframe-htmlfile', 'jsonp-polling'],

// Set this to 'admin' or 'user' if using mock AuthService
// otherwise set to null or false

'mockRole': null
};
38 changes: 0 additions & 38 deletions app/config/appConfig_sample.js

This file was deleted.

9 changes: 6 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ module.exports = function (config) {
config.set({

preprocessors: {
"app/**/*.js": "coverage",
'**/*.html': ['ng-html2js']
},
reporters: ['coverage'],

basePath: './',

Expand Down Expand Up @@ -132,15 +134,16 @@ module.exports = function (config) {

plugins: [
'karma-chrome-launcher',
'karma-coverage',
'karma-firefox-launcher',
'karma-jasmine',
'karma-junit-reporter',
'karma-ng-html2js-preprocessor'
],

junitReporter: {
outputFile: 'test_out/unit.xml',
suite: 'unit'
coverageReporter: {
type: "lcov",
dir: "coverage/"
}

});
Expand Down
Loading

0 comments on commit 5d80f79

Please sign in to comment.