diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..f22218c --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,50 @@ +# 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, pull_request] + +env: + deb_packages: | + libcapnp-dev + +jobs: + linux: + 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 }} + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y ${{ env.deb_packages }} + - run: npm install + - run: npm test + + macos: + runs-on: macOS-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 }} + - name: Install dependencies + run: | + brew install capnp + - run: npm install + - run: npm test diff --git a/README.md b/README.md index 9ef9538..2de2d3c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Tests](https://github.com/capnproto/node-capnp/workflows/Node.js%20CI/badge.svg?branch=node10&event=push)](https://github.com/capnproto/node-capnp/actions?query=workflow%3A"Node.js+CI") + # Cap'n Proto bindings for Node.js This package is a hacky wrapper around the [Cap'n Proto](http://capnproto.org)