autolevel.js

Automatically use the right abstract-leveldown module for your configuration
git clone git://git.finwo.net/lib/autolevel.js
Log | Files | Refs | README | LICENSE

commit bf4bb40d7192d094f4b4cef41d9a49e3a9828c72
parent d09578a2b4341dc1eb498ac52ba684fc35c88101
Author: finwo <finwo@pm.me>
Date:   Sat,  2 Nov 2019 12:50:59 +0100

Added automation for github

Diffstat:
A.github/FUNDING.yml | 3+++
A.github/workflows/publish.yml | 33+++++++++++++++++++++++++++++++++
A.github/workflows/test.yml | 26++++++++++++++++++++++++++
D.gitlab-ci.yml | 27---------------------------
Mpackage.json | 3++-
Msrc/adapter.js | 14+++++++-------
6 files changed, 71 insertions(+), 35 deletions(-)

diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: finwo diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +name: Test and publish + +on: + push: + branches: + - master + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [8.x, 10.x, 12.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: npm install and npm test + run: | + npm install + npm test + - name: npm publish + run: | + npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN + npm publish || true + env: + CI: true + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml @@ -0,0 +1,26 @@ +name: Test and publish + +on: + push: + branches-ignore: + - master + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [8.x, 10.x, 12.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: npm install and npm test + run: | + npm install + npm test diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml @@ -1,27 +0,0 @@ -image: node:10.11.0 - -cache: - paths: - - node_modules/ - -stages: - - test - - deploy - -tests: - retry: 2 - stage: test - script: - - git submodule update --init --recursive - - npm rebuild - - npm install - - npm test - -deploy: - retry: 2 - stage: deploy - script: - - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc - - if [ $(npm view $(node -p "require('./package.json').name") version) != $(node -p "require('./package.json').version") ]; then npm publish ; fi - only: - - master diff --git a/package.json b/package.json @@ -9,7 +9,8 @@ "url": "https://gitlab.com/finwo/autolevel" }, "scripts": { - "test": "NODE_ENV=babel jest" + "test": "NODE_ENV=babel jest", + "postpublish": "PACKAGE_VERSION=$(cat package.json | grep \\\"version\\\" | head -1 | awk -F: '{print $2}' | sed 's/[\",]//g' | tr -d '[[:space:]]') && npm deprecate \"autolevel@<${PACKAGE_VERSION}\" \"Rolling release, please update to ${PACKAGE_VERSION}\"" }, "author": "Robin Bron <robin@finwo.nl>", "license": "BSD2", diff --git a/src/adapter.js b/src/adapter.js @@ -45,13 +45,13 @@ let adapters = [ name : ['pg', 'postgres', 'postgresql'], backend : 'sqldown', dependencies: ['levelup', 'sqldown', 'knex', 'pg', 'pg-query-stream'] - }, { - name : ['wsrpc','wssrpc','ws-rpc','wss-rpc','rpc','rpcs'], - backend : './custom/wsrpc', - dependencies: ['levelup', 'cws', 'multilevel'], - options : { - direct: true - } + // }, { + // name : ['wsrpc','wssrpc','ws-rpc','wss-rpc','rpc','rpcs'], + // backend : './custom/wsrpc', + // dependencies: ['levelup', 'cws', 'multilevel'], + // options : { + // direct: true + // } } ];