Skip to content

Commit

Permalink
test: merge pull request #4 from Haprog/test-actions
Browse files Browse the repository at this point in the history
Run tests with Node.js CI in GitHub Actions.
Fixes #3.
  • Loading branch information
Haprog authored Apr 6, 2020
2 parents a97f9e6 + 042784e commit 091b2f9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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: Node.js CI

on:
push:
branches: [ master, test-actions ]
pull_request:
branches: [ master, test-actions ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
env:
CI: true
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![Node.js CI](https://github.com/Haprog/hash-actions/workflows/Node.js%20CI/badge.svg)

# hash-actions

A utility for working with the `hashchange` event and `window.location.hash`.
Expand Down

0 comments on commit 091b2f9

Please sign in to comment.