Added cli validators test in pytest and CI for localnet dependent tests. #589
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 do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: build | |
on: | |
pull_request: | |
branches: [main, feat/*] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build and Test mxpy for ${{ matrix.os }}, python ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-2019] | |
python-version: [3.11] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
shell: bash | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install -r requirements.txt | |
pip3 install -r requirements-dev.txt | |
- name: Set github_api_token | |
shell: bash | |
run: | | |
mkdir ~/multiversx-sdk | |
export PYTHONPATH=. | |
python3 -m multiversx_sdk_cli.cli config new test | |
python3 -m multiversx_sdk_cli.cli config set github_api_token ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup test dependencies | |
shell: bash | |
run: | | |
python3 -m multiversx_sdk_cli.cli deps install testwallets | |
python3 -m multiversx_sdk_cli.cli deps install rust | |
- name: Run unit tests | |
shell: bash | |
run: | | |
export PYTHONPATH=. | |
pytest -m "not skip_on_windows" . | |
- name: Run CLI tests | |
shell: bash | |
run: | | |
export PROXY=https://testnet-gateway.multiversx.com | |
export CHAIN_ID=T | |
cd ./multiversx_sdk_cli/tests | |
source ./test_cli_tx.sh && testAll || return 1 | |
source ./test_cli_dns.sh && testOffline || return 1 | |
source ./test_cli_validators.sh && testAll || return 1 |