diff --git a/.eslintrc.json b/.eslintrc.json index 4db51ca..3de38b4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -39,7 +39,8 @@ }, "rules": { "max-len": "off", - "prefer-arrow-callback": "off" + "prefer-arrow-callback": "off", + "no-return-assign": "off" } } ], diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..67fede4 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,48 @@ +name: Build + +on: [push, pull_request] + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Setup + uses: actions/setup-node@v3 + with: + node-version: 20.x + + - name: Install tools + run: npm install --location=global bslint + + - name: Install dependencies + run: npm install + + - name: Lint + run: npm run lint + + test: + name: Test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + node: [16.x, 18.x, 20.x] + + steps: + - uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + + - name: Install dependencies + run: npm install + + - name: Test + run: npm test + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..7054c0f --- /dev/null +++ b/package-lock.json @@ -0,0 +1,43 @@ +{ + "name": "bs32", + "version": "0.1.6", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "bs32", + "version": "0.1.6", + "license": "MIT", + "dependencies": { + "bsert": "~0.0.10" + }, + "devDependencies": { + "bmocha": "^2.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/bmocha": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/bmocha/-/bmocha-2.1.8.tgz", + "integrity": "sha512-bog23Ckl9lRyBxrsi4FmX1rTz4d1WhHRpIA+q2lpoiXmNuroMHr1JUOU5sPiMZwvhLCxqffvWv3xCJC7PC126w==", + "dev": true, + "bin": { + "_bmocha": "bin/_bmocha", + "bmocha": "bin/bmocha" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/bsert": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/bsert/-/bsert-0.0.12.tgz", + "integrity": "sha512-lUB0EMu4KhIf+VQ6RZJ7J3dFdohYSeta+gNgDi00Hi/t3k/W6xZlwm9PSSG0q7hJ2zW9Rsn5yaMPymETxroTRw==", + "engines": { + "node": ">=8.0.0" + } + } + } +} diff --git a/package.json b/package.json index c09828a..ad2ac2d 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "author": "Christopher Jeffrey ", "main": "./lib/bs32.js", "scripts": { - "lint": "eslint lib/ test/ || exit 0", + "lint": "eslint lib/ test/", "test": "bmocha --reporter spec test/*-test.js" }, "dependencies": {