Update readme and workflow

This commit is contained in:
neeraj 2024-04-01 13:51:15 +05:30
parent 4237affad5
commit 8378d36bf3
2 changed files with 19 additions and 19 deletions

View File

@ -16,10 +16,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Checkout laconic2d - name: Checkout laconicd
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
path: "./laconic2d/" path: "./laconicd/"
repository: cerc-io/laconic2d repository: cerc-io/laconic2d
fetch-depth: 0 fetch-depth: 0
ref: main ref: main
@ -31,33 +31,33 @@ jobs:
dockerd -H $DOCKER_HOST --userland-proxy=false & dockerd -H $DOCKER_HOST --userland-proxy=false &
sleep 5 sleep 5
- name: Build laconic2d container - name: Build laconicd container
working-directory: laconic2d/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: ./build-laconic2d-container.sh run: ./build-laconicd-container.sh
- name: Build sdk container - name: Build sdk container
run: ./scripts/build-sdk-test-container.sh run: ./scripts/build-sdk-test-container.sh
- name: Start containers - name: Start containers
working-directory: laconic2d/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: docker compose up -d run: docker compose up -d
- name: Run tests - name: Run tests
working-directory: laconic2d/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: ./run-tests.sh run: ./run-tests.sh
- name: Start containers (auctions enabled) - name: Start containers (auctions enabled)
working-directory: laconic2d/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
env: env:
TEST_AUCTION_ENABLED: true TEST_AUCTION_ENABLED: true
run: docker compose up -d run: docker compose up -d
- name: Run auction tests - name: Run auction tests
working-directory: laconic2d/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: ./run-tests.sh test:auctions run: ./run-tests.sh test:auctions
- name: Start containers (expiry enabled) - name: Start containers (expiry enabled)
working-directory: laconic2d/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
env: env:
TEST_REGISTRY_EXPIRY: true TEST_REGISTRY_EXPIRY: true
run: docker compose up -d run: docker compose up -d
- name: Run nameservice expiry tests - name: Run nameservice expiry tests
working-directory: laconic2d/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: ./run-tests.sh test:nameservice-expiry run: ./run-tests.sh test:nameservice-expiry

View File

@ -1,6 +1,6 @@
# registry-sdk # registry-sdk
Client library used by TS/JS applications to communicate with laconic2d. Client library used by TS/JS applications to communicate with laconicd.
## Tests ## Tests
@ -18,14 +18,14 @@ Follow these steps to run the tests:
cp .env.example .env cp .env.example .env
``` ```
- Clone the [laconic2d repo](https://git.vdb.to/cerc-io/laconic2d) and change to repo directory. - Clone the [laconicd repo](https://git.vdb.to/cerc-io/laconic2d) and change to repo directory.
- Run the chain using `./scripts/init.sh`. - Run the chain using `./scripts/init.sh`.
- Export the private key using: - Export the private key using:
```bash ```bash
laconic2d keys export alice --keyring-backend test --unarmored-hex --unsafe laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe
``` ```
- Copy the private key and assign it to variable `PRIVATE_KEY` in the `.env` file. - Copy the private key and assign it to variable `PRIVATE_KEY` in the `.env` file.
@ -38,7 +38,7 @@ Follow these steps to run the tests:
- Run the tests with auctions enabled - Run the tests with auctions enabled
- In laconic2d repo run: - In laconicd repo run:
```bash ```bash
TEST_AUCTION_ENABLED=true ./scripts/init.sh clean TEST_AUCTION_ENABLED=true ./scripts/init.sh clean
@ -47,7 +47,7 @@ Follow these steps to run the tests:
- Export the private key and change it in `.env` file again using: - Export the private key and change it in `.env` file again using:
```bash ```bash
laconic2d keys export alice --keyring-backend test --unarmored-hex --unsafe laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe
``` ```
- Run tests: - Run tests:
@ -58,7 +58,7 @@ Follow these steps to run the tests:
- Run the tests for record and authority expiry - Run the tests for record and authority expiry
- In laconic2d repo run: - In laconicd repo run:
```bash ```bash
TEST_REGISTRY_EXPIRY=true ./scripts/init.sh clean TEST_REGISTRY_EXPIRY=true ./scripts/init.sh clean
@ -67,7 +67,7 @@ Follow these steps to run the tests:
- Export the private key and change it in `.env` file again using: - Export the private key and change it in `.env` file again using:
```bash ```bash
laconic2d keys export alice --keyring-backend test --unarmored-hex --unsafe laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe
``` ```
- Run tests: - Run tests:
@ -87,7 +87,7 @@ Follow these steps to run the tests:
failed to execute message; message index: 0: Invalid signature.: unauthorized failed to execute message; message index: 0: Invalid signature.: unauthorized
``` ```
- When sending `setRecord` message, an integer value passed in watcher attributes is parsed as float type in laconic2d while [unmarshalling json](https://pkg.go.dev/encoding/json#Unmarshal). - When sending `setRecord` message, an integer value passed in watcher attributes is parsed as float type in laconicd while [unmarshalling json](https://pkg.go.dev/encoding/json#Unmarshal).
- `setRecord` message throws error when fileds in [Record](./src/types.ts) message are not assigned. - `setRecord` message throws error when fileds in [Record](./src/types.ts) message are not assigned.
``` ```