Skip to content

Commit

Permalink
Run Integration tests natively in CI
Browse files Browse the repository at this point in the history
This patch modifies the integration tests to run natively, as in without
a container wrapping them, in github actions CI.
  • Loading branch information
jkilpatr authored and ChristianBorst committed Dec 9, 2024
1 parent b190479 commit b66792d
Show file tree
Hide file tree
Showing 10 changed files with 306 additions and 304 deletions.
192 changes: 80 additions & 112 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,221 +14,189 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
with:
working-directory: integration-tests/
workspaces: integration_tests/
cache-on-failure: true
- name: Build Integration Tests
run: cd integration_tests && cargo check --all --verbose
native_token:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: jpribyl/action-docker-layer-caching@v0.1.1
continue-on-error: true
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
- name: Prune cache to keep the size down
run: docker builder prune -af && docker system prune -af
workspaces: integration_tests/
cache-on-failure: true
- name: Test the native token features of the EVM
run: tests/all-up-test.sh NATIVE_TOKEN
run: tests/all-up-test-ci.sh NATIVE_TOKEN
lockup:
runs-on: ubuntu-latest
needs: native_token
steps:
- uses: actions/checkout@v2
- uses: jpribyl/action-docker-layer-caching@v0.1.1
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Lock up the chain and ensure funds are not transferrable
run: tests/all-up-test.sh LOCKUP
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh LOCKUP
microtx_fees:
runs-on: ubuntu-latest
needs: native_token
steps:
- uses: actions/checkout@v2
- uses: jpribyl/action-docker-layer-caching@v0.1.1
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Assert that fees are collected by the microtx module
run: tests/all-up-test.sh MICROTX_FEES
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh MICROTX_FEES
erc20_conversion:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/action-docker-layer-caching@v0.1.1
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Test the erc20 module's token conversion functionality
run: tests/all-up-test.sh ERC20_CONVERSION
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh ERC20_CONVERSION
liquid_accounts:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/action-docker-layer-caching@v0.1.1
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Test the microtx module's liquid infrastructure accounts functions
run: tests/all-up-test.sh LIQUID_ACCOUNTS
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh LIQUID_ACCOUNTS
ica_host:
needs: native_token
#needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/action-docker-layer-caching@v0.1.1
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Test the interchain accounts host module on Althea-L1
run: tests/all-up-test.sh ICA_HOST
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh ICA_HOST
ONBOARDING_DEFAULT_PARAMS:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/action-docker-layer-caching@v0.1.1
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Starts the onboarding module with the default params
run: tests/all-up-test.sh ONBOARDING_DEFAULT_PARAMS
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh ONBOARDING_DEFAULT_PARAMS
ONBOARDING_DISABLED_WHITELISTED:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/action-docker-layer-caching@v0.1.1
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Starts the onboarding module disabled with a whitelisted channel
run: tests/all-up-test.sh ONBOARDING_DISABLED_WHITELISTED
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh ONBOARDING_DISABLED_WHITELISTED
ONBOARDING_DISABLE_AFTER:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/action-docker-layer-caching@v0.1.1
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Starts the onboarding module permissively, but disables it after a transfer
run: tests/all-up-test.sh ONBOARDING_DISABLE_AFTER
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh ONBOARDING_DISABLE_AFTER
ONBOARDING_DELIST_AFTER:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/action-docker-layer-caching@v0.1.1
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Starts the onboarding module permissively, but removes the channel from the whilelist after a transfer
run: tests/all-up-test.sh ONBOARDING_DELIST_AFTER
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh ONBOARDING_DELIST_AFTER
DEX:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/action-docker-layer-caching@v0.1.1
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Performs basic DEX tests
run: tests/all-up-test.sh DEX
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh DEX
DEX_UPGRADE:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/action-docker-layer-caching@v0.1.1
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Tests the DEX callpath upgrade functionality
run: tests/all-up-test.sh DEX_UPGRADE
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh DEX_UPGRADE
DEX_SAFE_MODE:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/action-docker-layer-caching@v0.1.1
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Tests the DEX safe mode lockdown functionality
run: tests/all-up-test.sh DEX_SAFE_MODE
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh DEX_SAFE_MODE
DEX_OPS_PROPOSAL:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/action-docker-layer-caching@v0.1.1
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Tests the nativedex OpsProposal function
run: tests/all-up-test.sh DEX_OPS_PROPOSAL
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh DEX_OPS_PROPOSAL
UPGRADE:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/action-docker-layer-caching@v0.1.1
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
- name: Tests the nativedex OpsProposal function
run: tests/all-up-test.sh DEX_OPS_PROPOSAL
- name: Tests the Neutrino
run: tests/run-upgrade-test.sh v1.4.0
env:
NO_IMAGE_BUILD: True
workspaces: integration_tests/
cache-on-failure: true
- name: Tests the Neutrino upgrade
run: tests/run-upgrade-test.sh v1.4.0
10 changes: 5 additions & 5 deletions integration_tests/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions integration_tests/test_runner/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#[macro_use]
extern crate log;

use althea_proto::cosmos_sdk_proto::ibc;
use deep_space::Coin;
use deep_space::Contact;
use deep_space::PrivateKey;
Expand All @@ -16,7 +15,7 @@ use test_runner::bootstrapping::parse_dex_contract_addresses;
use test_runner::bootstrapping::parse_ibc_validator_keys;
use test_runner::bootstrapping::send_erc20s_to_evm_users;
use test_runner::bootstrapping::start_ibc_relayer;
use test_runner::bootstrapping::{deploy_contracts, get_keys};
use test_runner::bootstrapping::{deploy_erc20_contracts, get_keys};
use test_runner::tests::dex::dex_ops_proposal_test;
use test_runner::tests::dex::dex_safe_mode_test;
use test_runner::tests::dex::dex_test;
Expand Down Expand Up @@ -66,7 +65,7 @@ pub async fn main() {

if should_deploy_contracts() {
info!("test-runner in contract deploying mode, deploying contracts, then exiting");
deploy_contracts(&contact).await;
deploy_erc20_contracts(&contact).await;
info!("Deploying DEX");
deploy_dex().await;
info!("Deploying Multicall3");
Expand Down
Loading

0 comments on commit b66792d

Please sign in to comment.