Skip to content

Commit 7320454

Browse files
committed
Merge PR #11 from 'nodech/add-ci'
2 parents 1a9811e + f454b45 commit 7320454

File tree

5 files changed

+192
-156
lines changed

5 files changed

+192
-156
lines changed

.eslintrc.json

Lines changed: 0 additions & 152 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
name: Lint
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Setup
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 24.x
17+
18+
- name: Install tools
19+
run: npm install --location=global bslint
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Lint
25+
run: npm run lint
26+
27+
test:
28+
name: Test
29+
runs-on: ${{ matrix.os }}
30+
strategy:
31+
matrix:
32+
os: [ubuntu-latest]
33+
node: [16.x, 18.x, 20.x, 22.x, 24.x]
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: ${{ matrix.node }}
42+
43+
- name: Install dependencies
44+
run: npm install
45+
46+
- name: Test
47+
run: npm test
48+

eslint.config.cjs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
'use strict';
2+
3+
const rc = require('bslintrc');
4+
5+
module.exports = [
6+
rc.configs.recommended,
7+
rc.configs.bcoin,
8+
{
9+
languageOptions: {
10+
globals: {
11+
...rc.globals.node
12+
},
13+
ecmaVersion: 'latest'
14+
}
15+
},
16+
{
17+
files: [
18+
'bin/cli',
19+
'bin/hsd',
20+
'bin/node',
21+
'bin/hs-seeder',
22+
'bin/node',
23+
'bin/_seeder',
24+
'bin/spvnode',
25+
'bin/wallet',
26+
'bin/hsd-cli',
27+
'bin/hsw-cli',
28+
'etc/genesis',
29+
'**/*.js',
30+
'*.js'
31+
],
32+
languageOptions: {
33+
sourceType: 'commonjs'
34+
}
35+
},
36+
{
37+
files: ['test/{,**/}*.{js,cjs,mjs}'],
38+
languageOptions: {
39+
globals: {
40+
...rc.globals.mocha,
41+
register: 'readable'
42+
}
43+
},
44+
rules: {
45+
'max-len': 'off',
46+
'prefer-arrow-callback': 'off',
47+
'no-return-assign': 'off'
48+
}
49+
}
50+
];

package-lock.json

Lines changed: 89 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@
1717
"main": "./lib/goosig.js",
1818
"scripts": {
1919
"install": "node-gyp rebuild",
20-
"lint": "eslint ./{bench,etc,lib{,/js,/native,/internal},scripts,test{,/util}}/*.js || exit 0",
20+
"lint": "eslint ./{bench,etc,lib{,/js,/native,/internal},scripts,test{,/util}}/*.js",
2121
"test": "bmocha -S 'test/*-test.js'"
2222
},
2323
"dependencies": {
24-
"bcrypto": "~5.4.0",
25-
"bsert": "~0.0.10",
24+
"bcrypto": "~5.5.2",
25+
"bsert": "~0.0.13",
2626
"loady": "~0.0.5"
2727
},
2828
"devDependencies": {
29-
"bmocha": "^2.1.5"
29+
"bmocha": "^2.2.1",
30+
"bslintrc": "^0.0.3"
3031
},
3132
"engines": {
3233
"node": ">=8.0.0"

0 commit comments

Comments
 (0)