diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4e2bad7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + pull_request: + branches: + - develop + - main + +jobs: + popoto_tests: + name: Run all tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 16 + cache: "npm" + - name: Install npm dependencies + run: npm ci + - name: Build code + run: npm run build + - name: Run all the tests + run: npm test + - name: publish code coverage on CC + uses: paambaati/codeclimate-action@v3.0.0 + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..f8e99ae --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,30 @@ +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 16 + - run: npm ci + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 16 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm run build + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_AUTOMATION}} diff --git a/README.md b/README.md index 9e1945a..a629fe2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -
+ -[![Build Status](https://app.travis-ci.com/Nhogs/popoto.svg?branch=master)](https://app.travis-ci.com/Nhogs/popoto) +[![CI](https://github.com/nhogs/popoto/actions/workflows/ci.yml/badge.svg)](https://github.com/Nhogs/popoto/actions/workflows/ci.yml) [![npm version](https://img.shields.io/npm/v/popoto.svg)](https://www.npmjs.com/package/popoto) [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![Maintainability](https://api.codeclimate.com/v1/badges/d00736e10d4c630c2010/maintainability)](https://codeclimate.com/github/Nhogs/popoto/maintainability) diff --git a/package-lock.json b/package-lock.json index 807b5fb..d9ff878 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "popoto", - "version": "3.0.2", + "version": "3.0.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "popoto", - "version": "3.0.2", + "version": "3.0.3", "license": "GPL-3.0", "dependencies": { "d3": "^5.15.0" diff --git a/package.json b/package.json index decd3c6..944935a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "popoto", - "version": "3.0.2", + "version": "3.0.3", "description": "Graph based search interface for Neo4j database.", "keywords": [ "popoto",