Skip to content

Commit

Permalink
Add support for manual seal (#179)
Browse files Browse the repository at this point in the history
* Add support for manual seal

* Fixes

* Wait for finalized

* Automatically detect need to manual seal
  • Loading branch information
mattdean-digicatapult authored Dec 19, 2023
1 parent 1c988cf commit 408cd87
Show file tree
Hide file tree
Showing 10 changed files with 170 additions and 104 deletions.
1 change: 1 addition & 0 deletions .depcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignores: ['ts-node']
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@master
with:
node-version: 18.x
node-version: 20.x
- name: Use npm latest
run: npm install -g npm@latest
- name: Cache Node.js modules
Expand All @@ -64,7 +64,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@master
with:
node-version: 18.x
node-version: 20.x
- name: Use npm latest
run: npm install -g npm@latest
- name: Cache Node.js modules
Expand All @@ -86,7 +86,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@master
with:
node-version: 18.x
node-version: 20.x
- name: Use npm latest
run: npm install -g npm@latest
- name: Cache Node.js modules
Expand All @@ -100,7 +100,7 @@ jobs:
- name: Install Packages
run: npm ci
- name: Setup dependencies
run: docker-compose up -d
run: docker compose -f ./docker-compose-test.yaml up -d
- name: Sleep
uses: kibertoad/[email protected]
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@master
with:
node-version: 18.x
node-version: 20.x
- name: Use npm latest
run: npm install -g npm@latest
- name: Cache Node.js modules
Expand All @@ -52,7 +52,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@master
with:
node-version: 18.x
node-version: 20.x
- name: Use npm latest
run: npm install -g npm@latest
- name: Cache Node.js modules
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@master
with:
node-version: 18.x
node-version: 20.x
- name: Use npm latest
run: npm install -g npm@latest
- name: Cache Node.js modules
Expand All @@ -100,7 +100,7 @@ jobs:
- name: Install Packages
run: npm ci
- name: Setup dependencies
run: docker-compose up -d
run: docker compose -f ./docker-compose-test.yaml up -d
- name: Sleep
uses: kibertoad/[email protected]
with:
Expand Down
31 changes: 22 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,19 @@ To start the basic application
npm run local
```

To run the tests

```shell
npm run test
npm run test:unit
```

To install npm CLI tool. It will be linked to local binaries so can be executed as `process-management`

```shell
npm i -g
```

# using CLI
## using CLI

```sh
process-management help
```

## Options
### Options

`dscp-process-management` takes the following arguments to configure the `Polkadot.js` API connection:

Expand Down Expand Up @@ -198,3 +191,23 @@ $ process-management list --active
}
]
```
## Running tests
Unit tests can be run without docker using:
```shell
npm run test:unit
```
To run the integration test suite first bring up the test dependency services using docker
```shell
docker compose -f ./docker-compose-test.yaml up -d
```
And then to run the tests
```shell
npm run test
```
15 changes: 15 additions & 0 deletions docker-compose-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3'
services:
dscp-node:
image: digicatapult/dscp-node:latest
command: --base-path /data/
--dev
--manual-seal
--unsafe-ws-external
--unsafe-rpc-external
--rpc-cors all
ports:
- 30333:30333
- 9944:9944
- 9933:9933
restart: on-failure
Loading

0 comments on commit 408cd87

Please sign in to comment.