Massively removing any-kwyword usage from TypeScript code #712
Workflow file for this run
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
name: IMA container test | |
on: | |
push: | |
branches-ignore: | |
- 'docs-v*' | |
jobs: | |
test-comprehensive: | |
runs-on: self-hosted | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- uses: oven-sh/setup-bun@v1 | |
- name: INIT - force pre-clean | |
run: | | |
echo "------------------------------------------------------------------------------------" | |
sudo docker ps | |
echo "------------------------------------------------------------------------------------" | |
sudo docker stop run_sgx_sim_sgxwallet_1 || true | |
sudo docker stop tm || true | |
sudo docker stop redis || true | |
echo "------------------------------------------------------------------------------------" | |
sudo docker ps | |
echo "------------------------------------------------------------------------------------" | |
sudo rm -rf comprehensive-test || true | |
sudo rm -rf ./sgxwallet || true | |
sudo rm -rf ./transaction-manager || true | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: oven-sh/setup-bun@v1 | |
- name: UPDATE - system deps and install libc6, net-tools, btrfs-progs, zip, unzip, bash, procps, curl, jq | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libc6 net-tools btrfs-progs zip unzip build-essential | |
sudo apt-get install -y bash | |
sudo apt-get install -y procps | |
sudo apt-get install -y curl | |
sudo apt-get install -y jq | |
- name: INIT - uninstall old Node JS if any | |
run: | | |
sudo npm cache clean -f || true &> /dev/null | |
sudo apt-get remove -y nodejs npm node -y || true &> /dev/null | |
sudo apt-get purge -y nodejs -y || true &> /dev/null | |
sudo apt-get autoremove -y || true &> /dev/null | |
sudo rm -rf /usr/bin/node || true &> /dev/null | |
sudo rm -rf /usr/include/node || true &> /dev/null | |
sudo rm -rf /usr/lib/node_modules || true &> /dev/null | |
sudo rm -rf /usr/local/bin/npm || true &> /dev/null | |
sudo rm -rf /usr/local/share/man/man1/node* || true &> /dev/null | |
sudo rm -rf /usr/local/lib/dtrace/node.d || true &> /dev/null | |
sudo rm -rf ~/.npm || true &> /dev/null | |
sudo rm -rf ~/.node-gyp || true &> /dev/null | |
sudo rm -rf /opt/local/bin/node || true &> /dev/null | |
sudo rm -rf /opt/local/include/node || true &> /dev/null | |
sudo rm -rf /opt/local/lib/node_modules || true &> /dev/null | |
sudo rm -rf /usr/local/lib/node* || true &> /dev/null | |
sudo rm -rf /usr/local/include/node* || true &> /dev/null | |
sudo rm -rf /usr/local/bin/node* || true &> /dev/null | |
- name: INIT - install Node JS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: INIT - install Node utilities | |
run: | | |
npm install --global npx || true | |
npm install --global yarn | |
npm install --global node-gyp | |
- name: INIT - Download comprehensive-test | |
working-directory: ${{env.working-directory}} | |
run: | | |
sudo rm -rf ./comprehensive-test || true | |
export IMA_AGENT_ROOT_DIR=$(pwd) | |
echo IMA_AGENT_ROOT_DIR = $IMA_AGENT_ROOT_DIR | |
git clone https://github.com/skalenetwork/comprehensive-test.git --recursive | |
- name: INIT - install Ethereum Main Net emulation | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test | |
pwd | |
export PATH=$PATH:$(dirname $(which npx)) | |
cd cli-hh | |
export NO_ANSI_COLORS=1 | |
./clean.sh | |
./init.sh | |
- name: INIT - startup Ethereum Main Net emulation | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test/cli-hh | |
./run.sh &> ../local_mainnet_output_log.txt & | |
- name: INIT - Install PYTHON | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: INIT - Install venv for PYTHON | |
working-directory: ${{env.working-directory}} | |
run: | | |
sudo apt-get install -y python3.8-venv | |
- name: INIT - Install everything in IMA | |
working-directory: ${{env.working-directory}} | |
run: | | |
yarn install | |
- name: INIT - build IMA | |
working-directory: ${{env.working-directory}} | |
run: | | |
yarn rebuild | |
- name: INIT - initialize comprehensive test tokens | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test/test_tokens | |
yarn install | |
- name: INIT - initialize S-Chain configuration creator | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test/s_chain_gen | |
yarn install | |
- name: INIT - initialize S-Chain configuration creator | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test/s_chain_gen | |
yarn install | |
- name: INIT - check skaled can run | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test | |
export DETECTED_UBUNTU_VERSION=$(lsb_release -r | cut -f2) | |
export TRYING_SKALED_AT_PATH=./app_cache/bin_$DETECTED_UBUNTU_VERSION/skaled | |
$TRYING_SKALED_AT_PATH --version | |
$TRYING_SKALED_AT_PATH --help | |
- name: INIT - generate configuration files for S-Chain nodes | |
working-directory: ${{env.working-directory}} | |
run: | | |
export PATH=$PATH:$(dirname $(which npx)) | |
cd comprehensive-test/s_chain_gen | |
yarn install | |
export NO_ANSI_COLORS=1 | |
./clean.sh || true | |
./init.sh | |
- name: INIT - download Skale Manager | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test | |
sudo rm -rf ./skale-manager || true | |
git clone https://github.com/skalenetwork/skale-manager.git --recursive | |
- name: INIT - install Skale Manager dependencies | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test/skale-manager | |
yarn install | |
- name: INIT - install comprehensive engine dependencies | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test/engine | |
yarn install | |
- name: INIT - build IMA docker container | |
working-directory: ${{env.working-directory}} | |
run: | | |
echo ------------ download binaries | |
LIB_BLS_RELEASE_TAG="0.2.0-develop.3" bash ./scripts/download_binaries.sh | |
echo ------------ docker image | |
export RELEASE=false | |
export VERSION=13.13.13-test.13 | |
echo "Docker image(will build) version is:" $VERSION | |
export NAME=ima | |
export BRANCH=$GIT_CURRENT_BRANCH | |
export REPO_NAME=skalenetwork/$NAME | |
export IMAGE_NAME=$REPO_NAME:$VERSION | |
export LATEST_IMAGE_NAME=$REPO_NAME:latest | |
echo "Docker image(will build) name for IMA Agent is:" $IMAGE_NAME | |
bash ./scripts/build_image.sh "" "" | |
- name: INIT - download SGX Wallet | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test | |
sudo docker stop run_sgx_sim_sgxwallet_1 || true | |
sudo rm -rf ./sgxwallet || true | |
git clone https://github.com/skalenetwork/sgxwallet.git --recursive | |
cd sgxwallet | |
git checkout develop | |
git fetch | |
git pull | |
git branch | |
git status | |
- name: INIT - update docker image SGX Wallet in the emulation mode | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test/sgxwallet/run_sgx_sim | |
rm -rf ../../local_sgxwallet_output_log.txt &> /dev/null | |
docker-compose down | |
docker-compose pull | |
- name: INIT - start SGX Wallet | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test/sgxwallet/run_sgx_sim | |
docker-compose up &> ../../local_sgxwallet_output_log.txt & | |
sleep 90 | |
- name: INIT - check SGX Wallet has listening ports | |
working-directory: ${{env.working-directory}} | |
run: | | |
echo "sleeping 180 seconds..." | |
sleep 180 | |
echo "checking port 1026 commonly used by SGX Wallet for HTTPS..." | |
sudo netstat -tulpn | grep 1026 | |
echo "...Done" | |
echo "checking port 1027 commonly used by SGX Wallet for HTTP..." | |
sudo netstat -tulpn | grep 1027 | |
echo "...Done" | |
- name: INIT - download transaction manager | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test | |
sudo rm -rf ./transaction-manager || true | |
git clone https://github.com/skalenetwork/transaction-manager --recursive | |
- name: INIT - start transaction manager and redis | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test/transaction-manager | |
export SGX_SERVER_URL=http://127.0.0.1:1027 | |
export ENDPOINT=http://127.0.0.1:8545 | |
#export ETH_PRIVATE_KEY=23ABDBD3C61B5330AF61EBE8BEF582F4E5CC08E554053A718BDCE7813B9DC1FC | |
export ETH_PRIVATE_KEY=fd6d151c4afe5c1c856e5a234950252be7a90210f3aa2bad4e0db037355c1dd6 | |
./scripts/run-test-containers.sh | |
cd .. | |
echo "------------------------------------------------------------------------------------" | |
docker ps | |
echo "------------------------------------------------------------------------------------" | |
export TM_CONTAINER_ID=$(docker ps | grep transaction-manager | awk '{print $1;}') | |
echo "Transaction manager docker container ID:" $TM_CONTAINER_ID | |
docker logs $TM_CONTAINER_ID -f &> engine/tm.log & | |
echo "------------------------------------------------------------------------------------" | |
export REDIS_CONTAINER_ID=$(docker ps | grep redis | awk '{print $1;}') | |
echo "Redis container ID:" $REDIS_CONTAINER_ID | |
docker logs $REDIS_CONTAINER_ID -f &> engine/redis.log & | |
- name: INIT - prepare ulimit | |
working-directory: ${{env.working-directory}} | |
run: | | |
ulimit -n 65535 > /dev/null | |
echo "ulimit is now set to" $(ulimit -n) | |
- name: RUN - create certificates | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test/engine/create_pems | |
sudo rm -rf ./new_certs/* || true | |
sudo rm -rf ./k.key || true | |
sudo rm -rf ./k.pem || true | |
sudo rm -rf ./k.crt || true | |
sudo rm -rf ./client.key || true | |
sudo rm -rf ./client.pem || true | |
sudo rm -rf ./client.crt || true | |
export NO_ANSI_COLORS=1 | |
./create_pems.sh | |
- name: RUN - full test - everything up and running | |
working-directory: ${{env.working-directory}} | |
run: | | |
export IMA_AGENT_ROOT_DIR=$(pwd) | |
echo IMA_AGENT_ROOT_DIR = $IMA_AGENT_ROOT_DIR | |
cd comprehensive-test/engine | |
export ALL_SKALE_TEST_CLOUD_RUN=1 | |
export DISABLE_S2S_TESTS=1 | |
export VERSION=13.13.13-test.13 | |
echo "Docker image(will run) version is:" $VERSION | |
export NAME=ima | |
export BRANCH=$GIT_CURRENT_BRANCH | |
export REPO_NAME=skalenetwork/$NAME | |
export IMAGE_NAME=$REPO_NAME:$VERSION | |
export LATEST_IMAGE_NAME=$REPO_NAME:latest | |
echo "Docker image(will run) name for IMA Agent is:" $IMAGE_NAME | |
export SEPARATED_IMA_AGENT_MODE=1 | |
export PATH=$PATH:$(dirname $(which npx)) | |
export COUNT_OF_SKALED_INSTANCES_TO_SKIP_START=0 | |
export COUNT_OF_IMA_AGENT_INSTANCES_TO_SKIP_START=0 | |
export NO_ANSI_COLORS=1 | |
node ./index.js | |
- name: RUN - full test - one SKALED is down | |
working-directory: ${{env.working-directory}} | |
run: | | |
export IMA_AGENT_ROOT_DIR=$(pwd) | |
echo IMA_AGENT_ROOT_DIR = $IMA_AGENT_ROOT_DIR | |
cd comprehensive-test/engine | |
export ALL_SKALE_TEST_CLOUD_RUN=1 | |
export DISABLE_S2S_TESTS=1 | |
export VERSION=13.13.13-test.13 | |
echo "Docker image(will run) version is:" $VERSION | |
export NAME=ima | |
export BRANCH=$GIT_CURRENT_BRANCH | |
export REPO_NAME=skalenetwork/$NAME | |
export IMAGE_NAME=$REPO_NAME:$VERSION | |
export LATEST_IMAGE_NAME=$REPO_NAME:latest | |
echo "Docker image(will run) name for IMA Agent is:" $IMAGE_NAME | |
export SEPARATED_IMA_AGENT_MODE=1 | |
export PATH=$PATH:$(dirname $(which npx)) | |
export COUNT_OF_SKALED_INSTANCES_TO_SKIP_START=1 | |
export COUNT_OF_IMA_AGENT_INSTANCES_TO_SKIP_START=0 | |
export NO_ANSI_COLORS=1 | |
node ./index.js | |
- name: RUN - full test - one IMA Agent is down | |
working-directory: ${{env.working-directory}} | |
run: | | |
export IMA_AGENT_ROOT_DIR=$(pwd) | |
echo IMA_AGENT_ROOT_DIR = $IMA_AGENT_ROOT_DIR | |
cd comprehensive-test/engine | |
export ALL_SKALE_TEST_CLOUD_RUN=1 | |
export DISABLE_S2S_TESTS=1 | |
export VERSION=13.13.13-test.13 | |
echo "Docker image(will run) version is:" $VERSION | |
export NAME=ima | |
export BRANCH=$GIT_CURRENT_BRANCH | |
export REPO_NAME=skalenetwork/$NAME | |
export IMAGE_NAME=$REPO_NAME:$VERSION | |
export LATEST_IMAGE_NAME=$REPO_NAME:latest | |
echo "Docker image(will run) name for IMA Agent is:" $IMAGE_NAME | |
export SEPARATED_IMA_AGENT_MODE=1 | |
export PATH=$PATH:$(dirname $(which npx)) | |
export COUNT_OF_SKALED_INSTANCES_TO_SKIP_START=0 | |
export COUNT_OF_IMA_AGENT_INSTANCES_TO_SKIP_START=1 | |
export NO_ANSI_COLORS=1 | |
node ./index.js | |
- name: RUN - full test - one SKALED and one IMA Agent are down | |
working-directory: ${{env.working-directory}} | |
run: | | |
export IMA_AGENT_ROOT_DIR=$(pwd) | |
echo IMA_AGENT_ROOT_DIR = $IMA_AGENT_ROOT_DIR | |
cd comprehensive-test/engine | |
export ALL_SKALE_TEST_CLOUD_RUN=1 | |
export DISABLE_S2S_TESTS=1 | |
export VERSION=13.13.13-test.13 | |
echo "Docker image(will run) version is:" $VERSION | |
export NAME=ima | |
export BRANCH=$GIT_CURRENT_BRANCH | |
export REPO_NAME=skalenetwork/$NAME | |
export IMAGE_NAME=$REPO_NAME:$VERSION | |
export LATEST_IMAGE_NAME=$REPO_NAME:latest | |
echo "Docker image(will run) name for IMA Agent is:" $IMAGE_NAME | |
export SEPARATED_IMA_AGENT_MODE=1 | |
export PATH=$PATH:$(dirname $(which npx)) | |
export COUNT_OF_SKALED_INSTANCES_TO_SKIP_START=1 | |
export COUNT_OF_IMA_AGENT_INSTANCES_TO_SKIP_START=1 | |
export NO_ANSI_COLORS=1 | |
node ./index.js | |
- name: RUN - full test - Main Net connectivity problems testing | |
working-directory: ${{env.working-directory}} | |
run: | | |
export IMA_AGENT_ROOT_DIR=$(pwd) | |
echo IMA_AGENT_ROOT_DIR = $IMA_AGENT_ROOT_DIR | |
cd comprehensive-test/engine | |
export ALL_SKALE_TEST_CLOUD_RUN=1 | |
export DISABLE_S2S_TESTS=1 | |
export VERSION=13.13.13-test.13 | |
echo "Docker image(will run) version is:" $VERSION | |
export NAME=ima | |
export BRANCH=$GIT_CURRENT_BRANCH | |
export REPO_NAME=skalenetwork/$NAME | |
export IMAGE_NAME=$REPO_NAME:$VERSION | |
export LATEST_IMAGE_NAME=$REPO_NAME:latest | |
echo "Docker image(will run) name for IMA Agent is:" $IMAGE_NAME | |
export SEPARATED_IMA_AGENT_MODE=1 | |
export PATH=$PATH:$(dirname $(which npx)) | |
export ENABLED_IMA_MAIN_NET_TUNNELLING=true | |
export ENABLED_IMA_MAIN_NET_CONNECTION_PROBLEMS=true | |
export NO_ANSI_COLORS=1 | |
node ./index.js | |
- name: SHUTDOWN - stop SGX Wallet | |
working-directory: ${{env.working-directory}} | |
run: | | |
cd comprehensive-test/sgxwallet/run_sgx_sim | |
docker-compose down | |
- name: SHUTDOWN - stop transaction manager and redis | |
run: | | |
docker stop $TM_CONTAINER_ID $REDIS_CONTAINER_ID || true | |
docker rm $TM_CONTAINER_ID $REDIS_CONTAINER_ID || true | |
- name: SHUTDOWN - zombie cleanup, if any | |
run: | | |
killall -9 skaled node npx python python3 || true | |
pkill -9 -f skaled || true |