From 066c496ad0c865642ecd835c15d1cf60ad4d26a4 Mon Sep 17 00:00:00 2001 From: Jacob Alexander Date: Sat, 21 Nov 2020 22:27:08 -0800 Subject: [PATCH 1/3] Add GitHub Actions CI test --- .github/workflows/node.js.yml | 36 +++++++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..e93a3ff --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,36 @@ +# 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: [ node10 ] + pull_request: + branches: [ node10 ] + +env: + deb_packages: | + libcapnp-dev + +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 }} + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y ${{ env.deb_packages }} + - 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) From 2a8a868b459f1ad50e9339b8c5d8c286396fca87 Mon Sep 17 00:00:00 2001 From: Jacob Alexander Date: Sun, 22 Nov 2020 00:50:12 -0800 Subject: [PATCH 2/3] Adding macOS GitHub Action --- .github/workflows/node.js.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index e93a3ff..435ee49 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -14,8 +14,7 @@ env: libcapnp-dev jobs: - build: - + linux: runs-on: ubuntu-latest strategy: @@ -34,3 +33,22 @@ jobs: 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 From 1972ab0d1c2f1a4eca5c2d79a5d0c771228be221 Mon Sep 17 00:00:00 2001 From: Jacob Alexander Date: Mon, 30 Nov 2020 21:48:05 -0800 Subject: [PATCH 3/3] Adjusting triggers to be on both push and pull_requests --- .github/workflows/node.js.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 435ee49..f22218c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -3,11 +3,7 @@ name: Node.js CI -on: - push: - branches: [ node10 ] - pull_request: - branches: [ node10 ] +on: [push, pull_request] env: deb_packages: |