Skip to content

Commit

Permalink
Setup github actions for ci (#26)
Browse files Browse the repository at this point in the history
* Switch to Github actions from travisCI

Co-authored-by: Ben Pennell <ben.pennell@gmail.com>
  • Loading branch information
lfarrell and bbpennel committed Feb 19, 2021
1 parent ee4f6ff commit 42fdfac
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 26 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Build

on:
pull_request:
branches: [main]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache npm modules
uses: actions/cache@v2
with:
path: ~/.npm
key: v1-npm-deps-${{ hashFiles('**/package-lock.json') }}
restore-keys: v1-npm-deps-
- run: make deps
- run: make check
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ examples: $(EXAMPLE_TEMPLATES:.json.example=.json) ## Copy example forms and voc
cp $< $@

deps: ## Install dependencies for the client and API server
cd server && npm install
cd server && npm ci

check: ## Run code style checks, linting, and unit tests.
cd server && npm run lint
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Therapy Dog - Server (Deposit Forms)

![Build](https://github.com/UNC-Libraries/therapy-dog-server/workflows/Build/badge.svg)

This is a Node.js and Ember application that provides:

- flexible forms for collecting files and metadata,
Expand Down Expand Up @@ -44,7 +46,7 @@ Install Node.js as above.

Rather than installing dependencies using `make deps` as above:

cd server && npm install
cd server && npm ci

Copy the example forms and vocabularies:

Expand Down

0 comments on commit 42fdfac

Please sign in to comment.