Skip to content

Environment spin up in tests using Kurtosis #46

Environment spin up in tests using Kurtosis

Environment spin up in tests using Kurtosis #46

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Docker Integration Test
on: [pull_request]
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Pyyaml
run: |
pip3 install pyyaml
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Setup Kurtosis repo
run: echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
- name: Install Kurtosis
run: sudo apt-get update && sudo apt-get install -y kurtosis-cli
- name: Build docker image
run: make clean && make build-docker-node
- name: Run cluster with 4 nodes
run: >
kurtosis run github.com/kurtosis-tech/sei-package '{"cluster_size": 4, "num_accounts": 10, "image": "sei-chain/localnode", "git_ref": "${{ github.head_ref}}"}' --enclave sei-integration-test
- name: Verify Sei Chain is able to start up
run: python3 integration_test/scripts/runner.py integration_test/startup/startup_test.yaml
- name: Testing Dex Module
run: |
kurtosis service exec sei-integration-test sei-node-0 integration_test/contracts/deploy_dex_contract.sh mars
python3 integration_test/scripts/runner.py integration_test/dex_module/place_order_test.yaml
- name: Testing Wasm Module
run: |
kurtosis service exec sei-integration-test sei-node-0 integration_test/contracts/deploy_timelocked_token_contract.sh
python3 integration_test/scripts/runner.py integration_test/wasm_module/timelocked_token_delegation_test.yaml
python3 integration_test/scripts/runner.py integration_test/wasm_module/timelocked_token_admin_test.yaml
python3 integration_test/scripts/runner.py integration_test/wasm_module/timelocked_token_withdraw_test.yaml
kurtosis service exec sei-integration-test sei-node-0 integration_test/contracts/deploy_timelocked_token_contract.sh
python3 integration_test/scripts/runner.py integration_test/wasm_module/timelocked_token_emergency_withdraw_test.yaml