fix validators_docker.json #29
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: Test localnet-dependent tests | ||
on: | ||
pull_request: | ||
branches: [main, feat/*] | ||
workflow_dispatch: | ||
env: | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
jobs: | ||
localnet: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# TODO: enable mac-os back once debugging is done. | ||
# os: [ubuntu-latest, macos-latest] | ||
os: [ubuntu-latest] | ||
python-version: [3.11] | ||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- 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 | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
pip3 install -r requirements.txt | ||
pip3 install -r ./requirements-dev.txt --upgrade | ||
- name: Set up Docker image | ||
run: | | ||
docker build --build-arg PYTHON_VERSION=${{ matrix.python-version }} -t mxpy . | ||
- name: Deploy a localnet | ||
run: | | ||
docker run --name localnet -d -p 7950:7950 mxpy localnet start \ | ||
--configfile=/usr/src/app/multiversx_sdk_cli/tests/testdata/localnet_with_resolution_remote.toml | ||
- name: Test localnet dependent tests | ||
run: | | ||
docker cp localnet:/usr/src/app/localnet/validator00/config/validatorKey.pem ./validatorKey00.pem | ||
docker cp localnet:/usr/src/app/localnet/validator01/config/validatorKey.pem ./validatorKey01.pem | ||
docker cp localnet:/usr/src/app/localnet/validator02/config/validatorKey.pem ./validatorKey02.pem | ||
pytest -m require_localnet multiversx_sdk_cli/tests |