Skip to content

Commit

Permalink
Merge pull request #28 from TAMULib/sprint-action-staging
Browse files Browse the repository at this point in the history
Sprint action staging
  • Loading branch information
wwelling committed Feb 3, 2021
2 parents 2867689 + df3e943 commit c32e6e1
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 34 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build

on: [ push, pull_request, workflow_dispatch ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: "Node Cache"
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-cache-node-${{ hashFiles('**/package.json', '**/package-lock.json') }}

- name: "Node Modules Cache"
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-cache-node_modules-${{ hashFiles('**/package.json', '**/package-lock.json') }}

- name: "Setup Node"
uses: actions/setup-node@v2
with:
node-version: 10

- name: "Install Node"
run: npm install

- name: "Node Tests"
run: npm run test-ci

- name: "Coverage Report"
uses: MikeEdgar/github-action@raw_coverage_file
with:
github-token: ${{ secrets.github_token }}
path-to-file: './coverage/coveralls.json'
coverage-format: raw
17 changes: 9 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
logs/*
!.gitkeep
dist/
node_modules/
bower_components/
dist
node_modules
bower_components
tmp
.tmp/
.tmp
.project
.DS_Store
.idea
npm-debug.log
.sass-cache/
.sass-cache
app/config/appConfig.js
app/resources/styles/*
!app/resources/styles/sass/
!app/resources/styles/sass
app/resources/scripts/*
!app/resources/scripts/vendor/
app/node_modules/
!app/resources/scripts/vendor
app/node_modules
coverage
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,13 @@ module.exports = function (grunt) {
files: '**/*.scss',
tasks: ['sass']
}
},
coveralls: {
options: {
debug: true,
coverageDir: 'coverage/',
dryRun: true
}
}

});
Expand All @@ -219,9 +226,12 @@ 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', ['sass', 'symlink']);

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

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

grunt.registerTask('deploy', ['jshint', 'concat', 'uglify', 'usemin', 'sass', 'symlink']);
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# CatalogUI
An angular frontend for the Catalog Service
[![Build Status](https://github.com/TAMULib/GIFMButtonUI/workflows/Build/badge.svg)](https://github.com/TAMULib/GIFMButtonUI/actions?query=workflow%3ABuild)
[![Coverage Status](https://coveralls.io/repos/github/TAMULib/GIFMButtonUI/badge.svg)](https://coveralls.io/github/TAMULib/GIFMButtonUI)

# GIFMButtonUI
An angular frontend for the GIFM Button Service.
2 changes: 1 addition & 1 deletion app/config/appConfig_sample.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var appConfig = {

'version': 'Catalog UI',
'version': 'GIFMButton UI',

'allowAnonymous': false,

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/buttonManagementController.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ app.controller('ButtonManagementController', function ($controller, $scope, Pers
$scope.toggleButton = function(button) {
button.active = !button.active;
$scope.updateButton(button);
}
};

$scope.getToggleButtonText = function(button) {
return (button.active) ? "Deactivate":"Activate";
Expand Down
27 changes: 24 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
module.exports = function(config){
config.set({

preprocessors: {
"app/!(node_modules)/**/*.js": "coverage",
'**/*.html': ['ng-html2js']
},

reporters: ["progress", "coverage"],

basePath : './',

files : [

'app/config/appConfig.js',
'app/config/appConfig_sample.js',
'app/config/apiMapping.js',

'app/node_modules/jquery/dist/jquery.js',
Expand Down Expand Up @@ -62,18 +69,32 @@ module.exports = function(config){

frameworks: ['jasmine'],

browsers : ['Chrome', 'ChromeHeadless', 'FireFox'],
browsers: ["Chrome", "ChromeHeadless", "ChromeHeadlessNoSandbox", "Firefox"],

customLaunchers: {
ChromeHeadlessNoSandbox: {
base: "ChromeHeadless",
flags: ["--no-sandbox"]
}
},

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

junitReporter : {
outputFile: 'test_out/unit.xml',
suite: 'unit'
},

coverageReporter: {
type: "lcov",
dir: "coverage/"
}

});
Expand Down
17 changes: 12 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,24 @@
"prestart": "npm install -g grunt-cli",
"postinstall": "grunt",
"pretest": "npm install",
"test": "karma start karma.conf.js --browsers=ChromeHeadless",
"test-single-run": "karma start karma.conf.js --single-run --browsers=ChromeHeadless",
"test": "karma start karma.conf.js --single-run --browsers Firefox,ChromeHeadlessNoSandbox",
"test-single-run": "karma start karma.conf.js --single-run",
"test-ci": "karma start karma.conf.js --no-auto-watch --single-run --browsers=ChromeHeadlessNoSandbox",
"posttest-ci": "grunt coverage --force",
"preupdate-webdriver": "npm install",
"update-webdriver": "webdriver-manager update",
"preprotractor": "npm run update-webdriver",
"protractor": "protractor e2e-tests/protractor.conf.js",
"protractor": "protractor e2e/protractor.conf.js",
"stop": "wvr server --stop",
"start": "wvr server -b /cap --prod --uid catalog-webserver",
"start-dev": "wvr server -b /catalog-ui --uid catalog-webserver"
},
"dependencies": {
"ng-table": "3.0.1",
"@wvr/core": "2.0.7",
"ng-file-upload": "12.2.13",
"@wvr/core": "2.0.7"
"ng-table": "3.0.1",
"npm": "^6.14.11",
"webdriver-manager": "^12.1.8"
},
"devDependencies": {
"grunt": "1.0.3",
Expand All @@ -33,14 +37,17 @@
"grunt-contrib-symlink": "1.0.0",
"grunt-contrib-uglify": "4.0.1",
"grunt-contrib-watch": "1.1.0",
"grunt-karma-coveralls": "2.5.4",
"grunt-sass": "3.1.0",
"grunt-usemin": "3.1.1",
"jshint-stylish": "2.2.1",
"karma": "3.1.4",
"karma-chrome-launcher": "3.1.0",
"karma-coverage": "2.0.1",
"karma-firefox-launcher": "1.1.0",
"karma-jasmine": "2.0.1",
"karma-junit-reporter": "1.2.0",
"karma-ng-html2js-preprocessor": "1.0.0",
"node-sass": "4.13.1",
"protractor": "5.4.2"
}
Expand Down

0 comments on commit c32e6e1

Please sign in to comment.