Skip to content

Commit

Permalink
total integration with i3M-Wallet desktop and server
Browse files Browse the repository at this point in the history
  • Loading branch information
juanelas committed Oct 30, 2022
1 parent 24ef617 commit 5953ac3
Show file tree
Hide file tree
Showing 124 changed files with 3,477 additions and 33,921 deletions.
3 changes: 3 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
RPC_PROVIDER_URL=
PRIVATE_KEY=
I3M_WALLET_SESSION_TOKEN=
101 changes: 50 additions & 51 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,19 @@ on:
push:
branches: [ public ]

env:
RPC_PROVIDER_URL: ${{ secrets.RPC_PROVIDER_URL }}
ETHERS_WALLET_ADDRESS: ${{ secrets.ETHERS_WALLET_ADDRESS }}
ETHERS_WALLET_PRIVATE_KEY: ${{ secrets.ETHERS_WALLET_PRIVATE_KEY }}

jobs:
build:
name: build and node tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
node-version: [14.x, 16.x, 18.x]
fail-fast: true
max-parallel: 1
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -40,57 +33,63 @@ jobs:
run: npm run docs

- name: node tests
run: npm run mocha-ts -- test/allInOne.ts
run: npm run test:node

- if: matrix.node-version == '16.x'
name: browser tests
run: npm run test:browser-headless -- test/allInOne.ts
run: npm run test:browser-headless

publication:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# publication:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

- uses: EndBug/version-check@v1
id: check
# - uses: EndBug/version-check@v1
# id: check

- name: check version changes
if: steps.check.outputs.changed == 'true'
run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'
# - name: check version changes
# if: steps.check.outputs.changed == 'true'
# run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'

- uses: actions/setup-node@v1
if: steps.check.outputs.changed == 'true'
with:
node-version: 16
registry-url: https://registry.npmjs.org/
# - uses: actions/setup-node@v3
# if: steps.check.outputs.changed == 'true'
# with:
# node-version: 18
# registry-url: https://registry.npmjs.org/

- name: install
if: steps.check.outputs.changed == 'true'
run: npm ci
# - name: install
# if: steps.check.outputs.changed == 'true'
# run: npm ci

- name: lint
if: steps.check.outputs.changed == 'true'
run: npm run lint
# - name: lint
# if: steps.check.outputs.changed == 'true'
# run: npm run lint

- name: build
if: steps.check.outputs.changed == 'true'
run: npm run build:js
# - name: build
# if: steps.check.outputs.changed == 'true'
# run: npm run build:js

- name: docs
if: steps.check.outputs.changed == 'true'
run: npm run docs
# - name: docs
# if: steps.check.outputs.changed == 'true'
# run: npm run docs

- name: node tests
if: steps.check.outputs.changed == 'true'
run: npm run mocha-ts -- test/allInOne.ts
- name: browser tests
if: steps.check.outputs.changed == 'true'
run: npm run test:browser-headless -- test/allInOne.ts
# # - name: browser tests
# # if: steps.check.outputs.changed == 'true'
# # run: npm run test:browser-headless

# - name: node tests and coverage
# if: steps.check.outputs.changed == 'true'
# run: npm run coverage

- name: publish to NPM
if: steps.check.outputs.changed == 'true'
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# # - name: send report to coveralls.io
# # if: steps.check.outputs.changed == 'true'
# # uses: coverallsapp/github-action@master
# # with:
# # github-token: ${{ secrets.GITHUB_TOKEN }}

# - name: publish to NPM
# if: steps.check.outputs.changed == 'true'
# run: npm publish --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

name: Coveralls.io

on:
workflow_dispatch:

jobs:
coverage:
name: Coverage report to Coveralls.io
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 16.x

- run: npm ci

- run: npm run build --if-present

- run: npm run coverage

- name: send report to coveralls.io
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
36 changes: 21 additions & 15 deletions .github/workflows/manualpublication.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,48 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: publish

on:
workflow_dispatch:

env:
RPC_PROVIDER_URL: ${{ secrets.RPC_PROVIDER_URL }}
ETHERS_WALLET_ADDRESS: ${{ secrets.ETHERS_WALLET_ADDRESS }}
ETHERS_WALLET_PRIVATE_KEY: ${{ secrets.ETHERS_WALLET_PRIVATE_KEY }}

jobs:
publication:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: https://registry.npmjs.org/

- name: install
run: npm ci

- name: lint
run: npm run lint
- name: lint src
run: npm run lint:src

- name: build
run: npm run build:js

- name: docs
run: npm run docs

- name: node tests
run: npm run mocha-ts -- test/allInOne.ts

- name: browser tests
run: npm run test:browser-headless -- test/allInOne.ts
- name: lint test
run: npm run lint:test

# - name: browser tests
# run: npm run test:browser-headless

# - name: node tests and coverage
# run: npm run coverage

# - name: send report to coveralls.io
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}

- name: publish to NPM
run: npm publish --access public
env:
Expand Down
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ npm-debug.log*
node_modules

# Output of 'npm pack'
#*.tgz
*.tgz

# MYC output
.nyc_output
# Coverage
coverage

# Environment files
Expand Down
18 changes: 14 additions & 4 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
build

# Test files
test
./test
__tests__
**/*.spec.ts
test-vectors

# Logs
logs
*.log
npm-debug.log*

# Output of 'npm pack'
releases
*.tgz

# Visual Studio Code
Expand All @@ -20,8 +21,7 @@ releases
# IntelliJ
.idea

# MYC output
.nyc_output
# Coverage
coverage

# GitHub
Expand All @@ -39,10 +39,20 @@ src/docs

# Environment files
*.env
*.env.*

# Test temporal files
.mocha-ts
.tsconfig.json

# docs temporal files
.nojekyll

# code of conduct
CODE_OF_CONDUCT.md

# TODO
TO-DO.txt

# benchmark
benchmark
Loading

0 comments on commit 5953ac3

Please sign in to comment.