Skip to content

Commit

Permalink
Merge pull request #173 from TAMULib/sprint-action-172-github-actions
Browse files Browse the repository at this point in the history
Sprint action 172 GitHub actions
  • Loading branch information
rmathew1011 authored Feb 3, 2021
2 parents df52004 + 84f0ffb commit 0a0de41
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 30 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build

on: [ push, pull_request, workflow_dispatch ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: "Install Chrome Drivers"
run: sudo apt-get install xvfb

- 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: 6

- name: "Install Node"
run: npm install

- name: "Node Tests"
run: |
xvfb-run --auto-servernum npm run test-ci
grunt coverage
- 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
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ module.exports = function (grunt) {
coveralls: {
options: {
debug: true,
coverageDir: 'coverage/'
coverageDir: 'coverage/',
dryRun: true
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"pretest": "npm install",
"test": "karma start karma.conf.js",
"test-single-run": "karma start karma.conf.js --single-run",
"test-ci": "karma start karma.conf.js --no-auto-watch --single-run --browsers=Chrome",
"test-ci": "karma start karma.conf.js --no-auto-watch --single-run --browsers=ChromeHeadless",
"preupdate-webdriver": "npm install",
"update-webdriver": "webdriver-manager update",
"preprotractor": "npm run update-webdriver",
Expand Down

0 comments on commit 0a0de41

Please sign in to comment.