Skip to content

Commit

Permalink
Merge pull request #274 from tshaddix/tshaddix-patch-1
Browse files Browse the repository at this point in the history
Add Github Actions for build support
  • Loading branch information
tshaddix authored Nov 6, 2021
2 parents a7787fc + 61b6c62 commit 95ff156
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean install of node dependencies, cache/restore them, 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: Node.js CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.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@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm i
- run: npm run build --if-present
- run: npm test
4 changes: 0 additions & 4 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
"typings": "./index.d.ts",
"scripts": {
"umd-build": "rollup -c",
"build": "./node_modules/.bin/babel src --out-dir lib && npm run umd-build",
"lint-src": "./node_modules/.bin/eslint src/**/*.js",
"lint-test": "./node_modules/.bin/eslint test/**/*.js",
"lint": "npm run lint-src && npm run lint-test",
"prepublishOnly": "./node_modules/.bin/babel src --out-dir lib && npm run umd-build",
"prepublishOnly": "npm run build",
"pretest": "./node_modules/.bin/babel src --out-dir lib",
"test-run": "./node_modules/.bin/mocha --require @babel/register --recursive",
"test": "npm run lint && npm run test-run"
Expand Down

0 comments on commit 95ff156

Please sign in to comment.