Skip to content

Latest commit

 

History

History
107 lines (72 loc) · 2.32 KB

how_to_run.md

File metadata and controls

107 lines (72 loc) · 2.32 KB

How to use

At first, you need to set up a Python 3 virtualenv, and also need to have npm installed and be able to install packages globally on it.

Then you need to install dependencies for the CLI utility:

pip3 install -r deploy/requirements/click.txt

After this, you can use from the project root directory:

./clickfile.py --help

This file contains a lot of utilities to work with this repository, such as:

  1. update deps
  2. install pre-commit-hook
  3. download test contracts
  4. run different tests
  5. prepare data and stand for run tests

Install dependencies

Please use clickfile.py to install deps because our web3 has conflicts with solana package, and this problem is resolved in:

./clickfile.py requirements

Install Pre-commit hooks

Please install pre-commit hooks to run linter and formatter in auto pre-commit mode

pre-commit install

Download test contracts

To download test contracts from the Neon EVM repo, you need to use:

./clickfile.py update-contracts

Set environment variables for tests

To set variable DOCKER_HUB_ORG_NAME text to terminal

export DOCKER_HUB_ORG_NAME=neonlabsorg

Run OpenZeppelin tests

To run OpenZeppelin tests just use the next command:

./clickfile.py run oz --network <your-stand> --jobs 8

Run neon evm tests

To run neon evm tests usd the next command:

./clickfile.py run evm --network <your-stand> --numprocesses 6

Run tests manually

You can run all tests manually if know which framework it uses. For example, economy tests:

py.test integration/tests/economy/test_economics.py

Run tests on mainnet

To run tests with mark "mainnet"

./clickfile.py run basic -n mainnet

This command collects 73 items and run it on our mainnet. Bank accounts envs have to be set up:

export BANK_PRIVATE_KEY_MAINNET=
export ETH_BANK_PRIVATE_KEY_MAINNET=

To run tests in our ci the following secrets should be added to neon-tests repo:

secrets.ETH_BANK_PRIVATE_KEY_MAINNET
secrets.BANK_PRIVATE_KEY_MAINNET

Use manual run of Basic tests pipeline with stand option - "mainnet".

An approximate cost of one run is ~200 NEONs and ~0.125 SOL.

Useful options

  • --network - which network uses for run tests (from file envs.json)
  • --envs - change file name with networks