Skip to content

Merge pull request #417 from Tonomy-Foundation/development #252

Merge pull request #417 from Tonomy-Foundation/development

Merge pull request #417 from Tonomy-Foundation/development #252

Workflow file for this run

name: Run Tonomy-ID-SDK Tests
on:
push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Enable Corepack before setting up Node
run: corepack enable
- name: Run lint and test
uses: actions/setup-node@v4
with:
node-version: 22.3.0
cache: yarn
- run: yarn install --immutable
- run: yarn run build
- run: yarn run lint
- run: yarn run test:unit
compile-contracts:
name: Compiles contracts needed for bootstrap script
runs-on: ubuntu-20.04
container: tonomy/antelope
steps:
- uses: actions/checkout@v4
with:
repository: Tonomy-Foundation/Tonomy-Contracts
ref: development
path: Tonomy-Contracts
- name: Build demo.tmy contract
run: ./Tonomy-Contracts/contracts/demo.tmy/build.sh local
- name: Compile eosio.bios
run: ./Tonomy-Contracts/contracts/eosio.bios/build.sh local
- name: Compile eosio.msig
run: ./Tonomy-Contracts/contracts/eosio.msig/build.sh local
- name: Build eosio.token contract
run: ./Tonomy-Contracts/contracts/eosio.token/build.sh local
- name: Build eosio.tonomy contract
run: ./Tonomy-Contracts/contracts/eosio.tonomy/build.sh local
- name: Build tonomy contract
run: ./Tonomy-Contracts/contracts/tonomy/build.sh local
- name: Build vesting.tmy contract
run: ./Tonomy-Contracts/contracts/vesting.tmy/build.sh local
- name: Add Tonomy-Contracts dir to artifacts
uses: actions/upload-artifact@v3
with:
name: Tonomy-Contracts
path: ./Tonomy-Contracts
integration-test:
needs: compile-contracts
runs-on: ubuntu-20.04
env:
TONOMY_OPS_PRIVATE_KEY: PVT_K1_24kG9VcMk3VkkgY4hh42X262AWV18YcPjBTd2Hox4YWoP8vRTU
TONOMY_BOARD_PUBLIC_KEYS: '{"keys":["PUB_K1_81aU18Y3RdyFf2WY4Wy7g7fvG9M9d7hmY4rhNFeXouYYPjExua","PUB_K1_5HWprCobEy8LiYUpfVmh8BdGDb8ANPc8rhBhtNqhvXnuxpyCaq","PUB_K1_5VLYVhqfe7oh8TW2i6Nw251wbpoZ4p15DV7udqDjiaKnryx9YU"]}'
TONOMY_TEST_ACCOUNTS_PASSPHRASE: 'above day fever lemon piano sport'
services:
blockchain:
image: tonomy/blockchain:initialized-development
ports:
- 8888:8888
communication:
image: tonomy/communication:development
env:
BLOCKCHAIN_URL: "http://blockchain:8888"
ports:
- 5000:5000
steps:
- uses: actions/checkout@v4
- name: Delete Tonomy-Contracts directory
run: rm -rf ./Tonomy-Contracts
- name: Get Tonomy-Contracts directory from artifacts
uses: actions/download-artifact@v3
with:
name: Tonomy-Contracts
path: ./Tonomy-Contracts
- name: Enable Corepack before setting up Node
run: corepack enable
- name: Install SDK and Bootstrap blockchain
uses: actions/setup-node@v4
with:
node-version: 22.3.0
cache: yarn
- run: yarn install --immutable
- run: yarn run build
- run: yarn run cli bootstrap
- name: Run integration and governance tests
uses: actions/setup-node@v4
with:
node-version: 22.3.0
cache: yarn
- run: yarn run test:integration
- run: yarn run test:governance