Environment spin up in tests using Kurtosis #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
- 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@8d6f3a42e81c072162a822b8d91393e5c2e0bf1b '{"cluster_size": 4, "num_accounts": 10, "image": "sei-chain/localnode", "git_ref": "37cd048c5158fd131f3340c3266d3c48429e1d0d"}' --enclave sei-integration-test | |
# To run on the current PR | |
# run: > | |
# kurtosis run github.com/kurtosis-tech/sei-package@8d6f3a42e81c072162a822b8d91393e5c2e0bf1b '{"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: kurtosis service shell sei-integration-test sei-node-0 --exec /sei-protocol/sei-chain/integration_test/startup/startup_test.sh | |
- name: Testing Dex Module | |
run: kurtosis service shell sei-integration-test sei-node-0 --exec /sei-protocol/sei-chain/integration_test/dex_module/place_order_test.sh | |
- name: Testing Wasm Module | |
run: | | |
kurtosis service shell sei-integration-test sei-node-0 --exec /sei-protocol/sei-chain/integration_test/contracts/deploy_timelocked_token_contract.sh | |
kurtosis service shell sei-integration-test sei-node-0 --exec /sei-protocol/sei-chain/integration_test/wasm_module/timelocked_token_test_1.sh | |
kurtosis service shell sei-integration-test sei-node-0 --exec /sei-protocol/sei-chain/integration_test/contracts/deploy_timelocked_token_contract.sh | |
kurtosis service shell sei-integration-test sei-node-0 --exec /sei-protocol/sei-chain/integration_test/wasm_module/timelocked_token_test_2.sh | |
kurtosis service shell sei-integration-test sei-node-0 --exec /sei-protocol/sei-chain/integration_test/contracts/deploy_timelocked_token_contract.sh migration | |
kurtosis service shell sei-integration-test sei-node-0 --exec /sei-protocol/sei-chain/integration_test/wasm_module/timelocked_token_test_3.sh |