Skip to content

Commit 65e3e7d

Browse files
author
Fabrice Bascoulergue
committed
Add base cicd configuration
1 parent 7159691 commit 65e3e7d

File tree

5 files changed

+284
-10
lines changed

5 files changed

+284
-10
lines changed

.github/workflows/cd.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CD
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
7+
8+
jobs:
9+
build:
10+
name: Release & Publish
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version: [12.x]
17+
redis-version: [5]
18+
19+
env:
20+
CLOUDSDK_CORE_PROJECT: dev
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v2
25+
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v2
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
registry-url: 'https://registry.npmjs.org'
31+
32+
- name: Install dependencies
33+
run: yarn --frozen-lockfile
34+
- name: Run code formatter
35+
run: yarn format
36+
- name: Run code linter
37+
run: yarn lint
38+
- name: Run unit tests
39+
run: yarn test
40+
41+
- name: Run build lib, types and docs
42+
run: yarn build
43+
- name: Copy LICENSE
44+
run: cp LICENSE lib/LICENSE
45+
- name: Copy README
46+
run: cp README.md lib/README.md
47+
- name: Copy sanitized package.json
48+
run: cp package.json lib/package.json
49+
- name: Publish package to NPM
50+
run: npm publish
51+
env:
52+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- develop
8+
9+
jobs:
10+
build:
11+
name: Format Lint Test Build
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version: [10.x, 12.x, 14.x, 15.x]
17+
redis-version: [4, 5, 6]
18+
19+
env:
20+
CLOUDSDK_CORE_PROJECT: dev
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v2
25+
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v2
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
31+
- name: Install dependencies
32+
run: yarn --frozen-lockfile
33+
- name: Run code formatter
34+
run: yarn format
35+
- name: Run code linter
36+
run: yarn lint
37+
- name: Run unit tests
38+
run: yarn test
39+
- name: Run build lib, types and docs
40+
run: yarn build

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Sandblock Chain - Javascript SDK
1+
# Lum Network - Javascript SDK
22

3-
This Javascript SDK enables browsers and NodeJS clients to interact with the Sandblock Chain.
3+
This Javascript SDK enables browsers and NodeJS clients to interact with the Lum Network.
44

55
## SDK Features
66

7-
This SDK basically provides an easy access to all the available Sandblock Chain RPCs as well as the payload generation and the cryptographic features to properly consume those RPCs.
7+
This SDK basically provides an easy access to all the available Lum Network blockchain RPCs as well as the payload generation and the cryptographic features to properly consume those RPCs.
88

99
**Most commonly used features:**
1010

package.json

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
{
2-
"name": "@sandblock-chain/sdk-javascript",
3-
"version": "1.0.0",
2+
"name": "@lum-network/sdk-javascript",
3+
"version": "0.1.0",
44
"license": "Apache-2.0",
5+
"description": "Javascript SDK library for NodeJS and Web browsers to interact with the Lum Network.",
6+
"homepage": "https://github.com/lum-network/sdk-javascript#readme",
7+
"bugs": {
8+
"url": "https://github.com/lum-network/sdk-javascript/issues"
9+
},
10+
"author": {
11+
"name": "Lum Network"
12+
},
13+
"repository": {
14+
"type": "git",
15+
"url": "https://github.com/lum-network/sdk-javascript.git"
16+
},
517
"main": "lib/index.js",
618
"typings": "lib/index.d.ts",
719
"files": [
820
"lib/*"
921
],
1022
"scripts": {
1123
"test": "cross-env NODE_ENV=test jest",
12-
"build": "yarn clean && yarn build:types && yarn build:js",
24+
"build": "yarn clean && yarn build:types && yarn build:js && yarn build:docs",
1325
"build:types": "tsc --emitDeclarationOnly",
1426
"build:js": "babel src --out-dir lib --extensions \".ts,.tsx\" --source-maps inline",
27+
"build:docs": "rimraf docs/lib && typedoc --excludeExternals --excludeNotDocumented --readme none --out docs/lib --hideBreadcrumbs --disableSources",
1528
"clean": "rimraf lib",
1629
"lint": "eslint '**/*.{ts,js}'",
17-
"format": "prettier --write '**/*.{js,jsx,ts,tsx,css,json,md,html,yml}'"
30+
"format": "prettier --write '**/*.{js,jsx,ts,tsx,css,json,md,html,yml}'",
31+
"bump": "npm version"
1832
},
1933
"dependencies": {},
2034
"optionalDependencies": {},
@@ -33,6 +47,8 @@
3347
"prettier": "^2.2.1",
3448
"rimraf": "^3.0.2",
3549
"ts-jest": "^26.5.0",
50+
"typedoc": "^0.20.25",
51+
"typedoc-plugin-markdown": "^3.5.0",
3652
"typescript": "^4.1.3"
3753
}
3854
}

0 commit comments

Comments
 (0)