Org id added to the logs #16
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: tests_master | |
on: | |
# push: | |
# branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
workflow_dispatch: | |
jobs: | |
run_tests_master: | |
runs-on: ubuntu-latest | |
# container: node:20-bookworm | |
services: | |
mysql: | |
image: mysql:8.0.21 | |
env: | |
MYSQL_ROOT_PASSWORD: unittest_pwd | |
MYSQL_HOST: '%' | |
MYSQL_DATABASE: unittest_db | |
MYSQL_USER: unittest_root | |
MYSQL_PASSWORD: unittest_pwd | |
ports: | |
- 3306:3306 | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.7' | |
- name: install pip | |
run: | | |
sudo apt update | |
sudo apt install -y python3-pip netcat-traditional socat iputils-ping | |
- name: install packs | |
run: | | |
export PIP_BREAK_SYSTEM_PACKAGES=1 | |
sudo apt update --allow-releaseinfo-change | |
sudo apt install unzip -y | |
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-linux.zip | |
unzip sonar-scanner-cli-4.6.2.2472-linux.zip | |
sudo apt install default-mysql-client -y | |
# pip3 install coverage coveralls pytest alembic | |
pip3 install pytest setuptools | |
- name: clone repo | |
uses: actions/checkout@v3 | |
- name: check db | |
run: | | |
for i in `seq 1 30`; | |
do | |
nc -z 172.17.0.1 3306 && echo Success && exit 0 | |
echo -n . | |
sleep 1 | |
done | |
echo Failed waiting for MySQL && exit 1 | |
- name: eth_event_listener layers packages test | |
run: | | |
pip3 install -r lambda_layers/eth_event_listener/requirements.txt | |
- name: install other side packages and layers | |
run: | | |
pip3 install -r lambda_layers/web3_and_grpc_libraries/requirements.txt | |
pip3 install -r lambda_layers/common_python_libraries/requirements.txt | |
pip3 install -r registry/migration/requirements.txt | |
- name: install npm packages | |
run: | | |
# export PIP_BREAK_SYSTEM_PACKAGES=1 | |
# export CFLAGS="-I${PREFIX}/include/python3.11/cpython" | |
# for requirement_file in `ls */*/requirement*.txt`;do pip3 install -r $requirement_file ;done | |
# for requirement_file in `ls */requirement*.txt`;do echo "=============$requirement_file=================="; pip3 install -r $requirement_file ;done | |
# pip3 install -r reqs.txt | |
for package_file in `ls */package*.json | cut -d '/' -f1`;do npm install $package_file/;done | |
- name: create db | |
run: | | |
# export PIP_BREAK_SYSTEM_PACKAGES=1 | |
# socat TCP-LISTEN:3306,fork TCP:mysql:3306 & | |
# mysql -h 172.17.0.1 -u root -punittest_pwd -e "create database registry_unittest_db" | |
mysql -h 127.0.0.1 -P 3306 -u root -punittest_pwd -e "create database registry_unittest_db" | |
mysql -h 127.0.0.1 -P 3306 -u root -punittest_pwd -e "create database verification_unittest_db" | |
mysql -h 127.0.0.1 -P 3306 -u root -punittest_pwd -e "GRANT ALL PRIVILEGES ON *.* TO 'unittest_root'@'%';" | |
export PYTHONPATH=$PWD | |
for alembic_file in `ls */alembic*.ini | cut -d '/' -f1`;do cd $alembic_file; echo $alembic_file; alembic upgrade head; cd .. ;done | |
mysql -h 127.0.0.1 -P 3306 -u unittest_root -punittest_pwd unittest_db < orchestrator/testcases/script.sql | |
- name: common tests | |
run: | | |
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | |
export AWS_XRAY_SDK_ENABLED=false | |
pip3 install -r common/requirements.txt | |
- name: dapp_user tests | |
run: | | |
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | |
export AWS_XRAY_SDK_ENABLED=false | |
pip3 install -r dapp_user/requirements.txt | |
PYTHONPATH=$PWD python3 -m coverage run -m pytest dapp_user/testcases/unit_testcases/*.py dapp_user/testcases/functional_testcases/*.py | |
- name: notification tests | |
run: | | |
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | |
export AWS_XRAY_SDK_ENABLED=false | |
pip3 install -r notification/requirements.txt | |
- name: payments tests | |
run: | | |
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | |
export AWS_XRAY_SDK_ENABLED=false | |
pip3 install -r payments/requirements.txt | |
PYTHONPATH=$PWD python3 -m coverage run -m pytest payments/testcases/unit_testcases/*.py | |
- name: service_status tests | |
run: | | |
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | |
export AWS_XRAY_SDK_ENABLED=false | |
pip3 install -r service_status/requirements.txt | |
pip3 install --upgrade protobuf | |
PYTHONPATH=$PWD python3 -m coverage run -m pytest service_status/testcases/unit_testcases/*.py service_status/testcases/functional_testcases/*.py | |
- name: utility tests | |
run: | | |
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | |
export AWS_XRAY_SDK_ENABLED=false | |
pip3 install setuptools==65.5.0 | |
pip3 install wheel==0.38.0 | |
pip3 install -r utility/requirements.txt | |
PYTHONPATH=$PWD python3 -m coverage run -m pytest utility/testcases/functional_testcases/*.py | |
- name: contract_api tests | |
run: | | |
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | |
export AWS_XRAY_SDK_ENABLED=false | |
pip3 install -r contract_api/requirements.txt | |
PYTHONPATH=$PWD python3 -m coverage run -m pytest contract_api/testcases/unit_testcases/*.py contract_api/testcases/unit_testcases/*/*.py contract_api/testcases/functional_testcases/*.py | |
- name: event_pubsub tests | |
run: | | |
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | |
export AWS_XRAY_SDK_ENABLED=false | |
pip3 install -r lambda_layers/web3_and_grpc_libraries/requirements.txt | |
pip3 install -r lambda_layers/common_python_libraries/requirements.txt | |
pip3 install -r event_pubsub/requirements.txt | |
PYTHONPATH=$PWD python3 -m coverage run -m pytest event_pubsub/testcases/unit_testcases/*.py | |
- name: orchestrator tests | |
run: | | |
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | |
export AWS_XRAY_SDK_ENABLED=false | |
pip3 install -r orchestrator/requirements.txt | |
PYTHONPATH=$PWD python3 -m coverage run -m pytest orchestrator/testcases/integration_testcases/*.py orchestrator/testcases/unit_testcases/*.py | |
- name: registry tests | |
run: | | |
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | |
export AWS_XRAY_SDK_ENABLED=false | |
pip3 install -r lambda_layers/web3_and_grpc_libraries/requirements.txt | |
pip3 install -r lambda_layers/common_python_libraries/requirements.txt | |
pip3 install -r registry/migration/requirements.txt | |
pip3 install -r registry/requirements.txt | |
PYTHONPATH=$PWD python3 -m coverage run -m pytest registry/testcases/unit_testcases/*.py registry/testcases/functional_testcases/*.py | |
- name: signer tests | |
run: | | |
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | |
export AWS_XRAY_SDK_ENABLED=false | |
pip3 install -r signer/requirements.txt | |
PYTHONPATH=$PWD python3 -m coverage run -m pytest signer/testcases/integration_testcases/*.py | |
- name: verification tests | |
run: | | |
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | |
export AWS_XRAY_SDK_ENABLED=false | |
pip3 install -r verification/requirements.txt | |
PYTHONPATH=$PWD python3 -m coverage run -m pytest verification/testcases/unit_testcases/*.py verification/testcases/functional_testcases/*.py | |
- name: wallets tests | |
run: | | |
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | |
export AWS_XRAY_SDK_ENABLED=false | |
pip3 install -r wallets/requirements.txt | |
PYTHONPATH=$PWD python3 -m coverage run -m pytest wallets/testcases/integration_testcases/*.py wallets/testcases/unit_testcases/*.py |