Skip to content

Commit

Permalink
Merge pull request #60 from datachainlab/fix-for-integration-test
Browse files Browse the repository at this point in the history
Fix web3-gateway to use iroha addresses everywhere and add integration testing for the onchain module
  • Loading branch information
siburu authored Feb 10, 2022
2 parents 364b13a + 1f9e758 commit 330a2af
Show file tree
Hide file tree
Showing 45 changed files with 57,986 additions and 5,447 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/test-onchain-module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: onchain-module
on:
pull_request:
paths:
- "docker/**"
- "onchain-module/**"
- ".github/workflows/test-onchain-module.yml"

jobs:
test-integration:
name: test-integration
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Set up Node.js 16
uses: actions/setup-node@v2
with:
node-version: '16'
- uses: actions/checkout@v2
- name: Cache go modules
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: |
${{ github.workspace }}/onchain-module/node_modules
key: ${{ runner.os }}-onchain-module-integration-${{ hashFiles('onchain-module/tests/e2e/contracts/package-lock.json') }}
restore-keys: |
${{ runner.os }}-onchain-module-integration-
- name: Run docker-compose
run: docker compose up -d iroha-node0 iroha-node0-postgres iroha-web3-gateway0
- name: Download NPM dependency
working-directory: onchain-module
run: |
npm install
- name: Migrate Contracts
working-directory: onchain-module
run: |
npm run migrate
- name: Run Integration Test for onchain-module
working-directory: onchain-module
run: |
make integration-test
8 changes: 4 additions & 4 deletions .github/workflows/test-web3-gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Set up Node.js 12
- name: Set up Node.js 16
uses: actions/setup-node@v2
with:
node-version: '12'
node-version: '16'
- uses: actions/checkout@v2
- name: Cache go modules
uses: actions/cache@v2
Expand All @@ -37,9 +37,9 @@ jobs:
with:
path: |
${{ github.workspace }}/web3-gateway/tests/e2e/contracts/node_modules
key: ${{ runner.os }}-web3-gateway-e2e-${{ hashFiles('web3-gateway/tests/e2e/contracts/package-lock.json') }}
key: ${{ runner.os }}-web3-gateway-${{ hashFiles('web3-gateway/tests/e2e/contracts/package-lock.json') }}
restore-keys: |
${{ runner.os }}-web3-gateway-e2e-
${{ runner.os }}-web3-gateway-
- name: Run docker-compose
run: docker compose up -d iroha-node0 iroha-node0-postgres iroha-web3-gateway0
- name: Download NPM dependency
Expand Down
1 change: 1 addition & 0 deletions docker/config/node0/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a6924c9781c46df18c05545735f127eaf788a60816a7aeb9d5e928460b51cb2f
1 change: 1 addition & 0 deletions docker/config/node0/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8884f3631f6435bce86b0da6868b10370441364ed225b3892e598cea96508323
1 change: 1 addition & 0 deletions docker/config/node0/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f66c1f19a52bf2955d00bf050793a80056ccfa6237b46f4d7d3a9e20af669c29
1 change: 1 addition & 0 deletions docker/config/node0/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d36b4f4de888a7b60681e405247131ba053faee3286cd5db8467535f58ef3202
Loading

0 comments on commit 330a2af

Please sign in to comment.