From f55196ea6d39eb8f9db73756a2769a568da1dc9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kari=20S=C3=B6derholm?= Date: Mon, 6 Apr 2020 11:20:51 +0300 Subject: [PATCH 1/2] test: setup GitHub Actions --- .github/workflows/nodejs.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/nodejs.yml diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..1ae0876 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -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 From 042784e267cbda27b57a8c27f1f35406e6064063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kari=20S=C3=B6derholm?= Date: Mon, 6 Apr 2020 12:27:59 +0300 Subject: [PATCH 2/2] docs(readme): add Node.js CI status badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f57b3a5..88dd69f 100644 --- a/README.md +++ b/README.md @@ -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`.