From c87cc82da9700e1f2dba70cd17249cf0299b4e53 Mon Sep 17 00:00:00 2001 From: Adam Kelly Date: Wed, 17 Mar 2021 00:08:10 -0700 Subject: [PATCH] WIP --- .github/workflows/build-test-macos-clvm.yml | 83 ++++++++++++++ .../build-test-macos-core-consensus.yml | 93 ++++++++++++++++ .../build-test-macos-core-daemon.yml | 93 ++++++++++++++++ .../build-test-macos-core-full_node.yml | 93 ++++++++++++++++ .../build-test-macos-core-server.yml | 93 ++++++++++++++++ .../workflows/build-test-macos-core-ssl.yml | 93 ++++++++++++++++ .../workflows/build-test-macos-core-types.yml | 93 ++++++++++++++++ .../workflows/build-test-macos-core-util.yml | 93 ++++++++++++++++ .github/workflows/build-test-macos-core.yml | 10 +- .../workflows/build-test-macos-simulation.yml | 10 +- .github/workflows/build-test-macos-util.yml | 93 ++++++++++++++++ .../build-test-macos-wallet-cc_wallet.yml | 93 ++++++++++++++++ .../build-test-macos-wallet-rl_wallet.yml | 93 ++++++++++++++++ .../workflows/build-test-macos-wallet-rpc.yml | 93 ++++++++++++++++ .github/workflows/build-test-macos-wallet.yml | 15 +-- .../build-test-ubuntu-blockchain.yml | 10 +- .github/workflows/build-test-ubuntu-clvm.yml | 95 ++++++++++++++++ .../build-test-ubuntu-core-consensus.yml | 105 ++++++++++++++++++ .../build-test-ubuntu-core-daemon.yml | 105 ++++++++++++++++++ .../build-test-ubuntu-core-full_node.yml | 105 ++++++++++++++++++ .../build-test-ubuntu-core-server.yml | 105 ++++++++++++++++++ .../workflows/build-test-ubuntu-core-ssl.yml | 105 ++++++++++++++++++ .../build-test-ubuntu-core-types.yml | 105 ++++++++++++++++++ .../workflows/build-test-ubuntu-core-util.yml | 105 ++++++++++++++++++ .github/workflows/build-test-ubuntu-core.yml | 10 +- .../build-test-ubuntu-simulation.yml | 10 +- .github/workflows/build-test-ubuntu-util.yml | 105 ++++++++++++++++++ .../build-test-ubuntu-wallet-cc_wallet.yml | 105 ++++++++++++++++++ .../build-test-ubuntu-wallet-rl_wallet.yml | 105 ++++++++++++++++++ .../build-test-ubuntu-wallet-rpc.yml | 105 ++++++++++++++++++ .../workflows/build-test-ubuntu-wallet.yml | 15 +-- 31 files changed, 2391 insertions(+), 45 deletions(-) create mode 100644 .github/workflows/build-test-macos-clvm.yml create mode 100644 .github/workflows/build-test-macos-core-consensus.yml create mode 100644 .github/workflows/build-test-macos-core-daemon.yml create mode 100644 .github/workflows/build-test-macos-core-full_node.yml create mode 100644 .github/workflows/build-test-macos-core-server.yml create mode 100644 .github/workflows/build-test-macos-core-ssl.yml create mode 100644 .github/workflows/build-test-macos-core-types.yml create mode 100644 .github/workflows/build-test-macos-core-util.yml create mode 100644 .github/workflows/build-test-macos-util.yml create mode 100644 .github/workflows/build-test-macos-wallet-cc_wallet.yml create mode 100644 .github/workflows/build-test-macos-wallet-rl_wallet.yml create mode 100644 .github/workflows/build-test-macos-wallet-rpc.yml create mode 100644 .github/workflows/build-test-ubuntu-clvm.yml create mode 100644 .github/workflows/build-test-ubuntu-core-consensus.yml create mode 100644 .github/workflows/build-test-ubuntu-core-daemon.yml create mode 100644 .github/workflows/build-test-ubuntu-core-full_node.yml create mode 100644 .github/workflows/build-test-ubuntu-core-server.yml create mode 100644 .github/workflows/build-test-ubuntu-core-ssl.yml create mode 100644 .github/workflows/build-test-ubuntu-core-types.yml create mode 100644 .github/workflows/build-test-ubuntu-core-util.yml create mode 100644 .github/workflows/build-test-ubuntu-util.yml create mode 100644 .github/workflows/build-test-ubuntu-wallet-cc_wallet.yml create mode 100644 .github/workflows/build-test-ubuntu-wallet-rl_wallet.yml create mode 100644 .github/workflows/build-test-ubuntu-wallet-rpc.yml diff --git a/.github/workflows/build-test-macos-clvm.yml b/.github/workflows/build-test-macos-clvm.yml new file mode 100644 index 000000000000..32c65fa49ffd --- /dev/null +++ b/.github/workflows/build-test-macos-clvm.yml @@ -0,0 +1,83 @@ +name: MacOS clvm Tests + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: MacOS clvm Tests + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.8, 3.9] + os: [macOS-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + # Note that new runners may break this https://github.com/actions/cache/issues/292 + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + BUILD_VDF_CLIENT: "N" + run: | + brew install boost + sh install.sh + + + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test clvm code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/clvm/test_puzzles.py tests/clvm/test_serialized_program.py tests/clvm/test_clvm_compilation.py tests/clvm/test_chialisp_deserialization.py -s -v --durations 0 -n auto diff --git a/.github/workflows/build-test-macos-core-consensus.yml b/.github/workflows/build-test-macos-core-consensus.yml new file mode 100644 index 000000000000..627d49710948 --- /dev/null +++ b/.github/workflows/build-test-macos-core-consensus.yml @@ -0,0 +1,93 @@ +name: MacOS core-consensus Tests + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: MacOS core-consensus Tests + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.8, 3.9] + os: [macOS-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + # Note that new runners may break this https://github.com/actions/cache/issues/292 + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + BUILD_VDF_CLIENT: "N" + run: | + brew install boost + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test core-consensus code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/core/consensus/test_pot_iterations.py -s -v --durations 0 diff --git a/.github/workflows/build-test-macos-core-daemon.yml b/.github/workflows/build-test-macos-core-daemon.yml new file mode 100644 index 000000000000..a9c12ab39eba --- /dev/null +++ b/.github/workflows/build-test-macos-core-daemon.yml @@ -0,0 +1,93 @@ +name: MacOS core-daemon Tests + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: MacOS core-daemon Tests + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.8, 3.9] + os: [macOS-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + # Note that new runners may break this https://github.com/actions/cache/issues/292 + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + BUILD_VDF_CLIENT: "N" + run: | + brew install boost + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test core-daemon code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/core/daemon/test_daemon_alerts.py -s -v --durations 0 diff --git a/.github/workflows/build-test-macos-core-full_node.yml b/.github/workflows/build-test-macos-core-full_node.yml new file mode 100644 index 000000000000..b950b410d0f5 --- /dev/null +++ b/.github/workflows/build-test-macos-core-full_node.yml @@ -0,0 +1,93 @@ +name: MacOS core-full_node Tests + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: MacOS core-full_node Tests + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.8, 3.9] + os: [macOS-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + # Note that new runners may break this https://github.com/actions/cache/issues/292 + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + BUILD_VDF_CLIENT: "N" + run: | + brew install boost + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test core-full_node code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/core/full_node/test_transactions.py tests/core/full_node/test_full_node_store.py tests/core/full_node/test_initial_freeze.py tests/core/full_node/test_address_manager.py tests/core/full_node/test_sync_store.py tests/core/full_node/test_node_load.py tests/core/full_node/test_mempool.py tests/core/full_node/test_mempool_performance.py tests/core/full_node/test_coin_store.py tests/core/full_node/test_block_store.py tests/core/full_node/test_full_sync.py tests/core/full_node/test_full_node.py -s -v --durations 0 diff --git a/.github/workflows/build-test-macos-core-server.yml b/.github/workflows/build-test-macos-core-server.yml new file mode 100644 index 000000000000..cb0814cafc74 --- /dev/null +++ b/.github/workflows/build-test-macos-core-server.yml @@ -0,0 +1,93 @@ +name: MacOS core-server Tests + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: MacOS core-server Tests + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.8, 3.9] + os: [macOS-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + # Note that new runners may break this https://github.com/actions/cache/issues/292 + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + BUILD_VDF_CLIENT: "N" + run: | + brew install boost + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test core-server code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/core/server/test_dos.py tests/core/server/test_rate_limits.py -s -v --durations 0 diff --git a/.github/workflows/build-test-macos-core-ssl.yml b/.github/workflows/build-test-macos-core-ssl.yml new file mode 100644 index 000000000000..8a81a55f65b9 --- /dev/null +++ b/.github/workflows/build-test-macos-core-ssl.yml @@ -0,0 +1,93 @@ +name: MacOS core-ssl Tests + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: MacOS core-ssl Tests + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.8, 3.9] + os: [macOS-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + # Note that new runners may break this https://github.com/actions/cache/issues/292 + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + BUILD_VDF_CLIENT: "N" + run: | + brew install boost + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test core-ssl code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/core/ssl/test_ssl.py -s -v --durations 0 diff --git a/.github/workflows/build-test-macos-core-types.yml b/.github/workflows/build-test-macos-core-types.yml new file mode 100644 index 000000000000..6b29a9d58449 --- /dev/null +++ b/.github/workflows/build-test-macos-core-types.yml @@ -0,0 +1,93 @@ +name: MacOS core-types Tests + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: MacOS core-types Tests + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.8, 3.9] + os: [macOS-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + # Note that new runners may break this https://github.com/actions/cache/issues/292 + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + BUILD_VDF_CLIENT: "N" + run: | + brew install boost + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test core-types code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/core/types/test_proof_of_space.py -s -v --durations 0 diff --git a/.github/workflows/build-test-macos-core-util.yml b/.github/workflows/build-test-macos-core-util.yml new file mode 100644 index 000000000000..8eca9b8acee1 --- /dev/null +++ b/.github/workflows/build-test-macos-core-util.yml @@ -0,0 +1,93 @@ +name: MacOS core-util Tests + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: MacOS core-util Tests + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.8, 3.9] + os: [macOS-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + # Note that new runners may break this https://github.com/actions/cache/issues/292 + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + BUILD_VDF_CLIENT: "N" + run: | + brew install boost + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test core-util code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/core/util/test_streamable.py tests/core/util/test_significant_bits.py tests/core/util/test_keychain.py tests/core/util/test_type_checking.py -s -v --durations 0 diff --git a/.github/workflows/build-test-macos-core.yml b/.github/workflows/build-test-macos-core.yml index a80a28dbf3f2..961a23607057 100644 --- a/.github/workflows/build-test-macos-core.yml +++ b/.github/workflows/build-test-macos-core.yml @@ -1,4 +1,4 @@ -name: MacOS Core Tests +name: MacOS core Tests on: push: @@ -12,9 +12,9 @@ on: jobs: build: - name: MacOS Core Tests + name: MacOS core Tests runs-on: ${{ matrix.os }} - timeout-minutes: 80 + timeout-minutes: 30 strategy: fail-fast: false max-parallel: 4 @@ -85,9 +85,9 @@ jobs: - name: Install developer requirements run: | . ./activate - venv/bin/python -m pip install pytest pytest-asyncio + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist - name: Test core code with pytest run: | . ./activate - ./venv/bin/py.test tests/core -s -v --durations 0 + ./venv/bin/py.test tests/core/test_setproctitle.py tests/core/test_cost_calculation.py tests/core/test_full_node_rpc.py tests/core/test_farmer_harvester_rpc.py tests/core/test_merkle_set.py tests/core/test_filter.py -s -v --durations 0 diff --git a/.github/workflows/build-test-macos-simulation.yml b/.github/workflows/build-test-macos-simulation.yml index 55d55f474ea5..4c9503d885e7 100644 --- a/.github/workflows/build-test-macos-simulation.yml +++ b/.github/workflows/build-test-macos-simulation.yml @@ -1,4 +1,4 @@ -name: MacOS Simulation Tests +name: MacOS simulation Tests on: push: @@ -12,9 +12,9 @@ on: jobs: build: - name: MacOS Simulation Tests + name: MacOS simulation Tests runs-on: ${{ matrix.os }} - timeout-minutes: 80 + timeout-minutes: 30 strategy: fail-fast: false max-parallel: 4 @@ -85,9 +85,9 @@ jobs: - name: Install developer requirements run: | . ./activate - venv/bin/python -m pip install pytest pytest-asyncio + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist - name: Test simulation code with pytest run: | . ./activate - ./venv/bin/py.test tests/simulation -s -v --durations 0 + ./venv/bin/py.test tests/simulation/test_simulation.py -s -v --durations 0 diff --git a/.github/workflows/build-test-macos-util.yml b/.github/workflows/build-test-macos-util.yml new file mode 100644 index 000000000000..0c07c7f54002 --- /dev/null +++ b/.github/workflows/build-test-macos-util.yml @@ -0,0 +1,93 @@ +name: MacOS util Tests + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: MacOS util Tests + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.8, 3.9] + os: [macOS-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + # Note that new runners may break this https://github.com/actions/cache/issues/292 + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + BUILD_VDF_CLIENT: "N" + run: | + brew install boost + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test util code with pytest + run: | + . ./activate + ./venv/bin/py.test -s -v --durations 0 diff --git a/.github/workflows/build-test-macos-wallet-cc_wallet.yml b/.github/workflows/build-test-macos-wallet-cc_wallet.yml new file mode 100644 index 000000000000..79d719ff453a --- /dev/null +++ b/.github/workflows/build-test-macos-wallet-cc_wallet.yml @@ -0,0 +1,93 @@ +name: MacOS wallet-cc_wallet Tests + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: MacOS wallet-cc_wallet Tests + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.8, 3.9] + os: [macOS-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + # Note that new runners may break this https://github.com/actions/cache/issues/292 + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + BUILD_VDF_CLIENT: "N" + run: | + brew install boost + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test wallet-cc_wallet code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/wallet/cc_wallet/test_cc_wallet.py tests/wallet/cc_wallet/test_trades.py -s -v --durations 0 diff --git a/.github/workflows/build-test-macos-wallet-rl_wallet.yml b/.github/workflows/build-test-macos-wallet-rl_wallet.yml new file mode 100644 index 000000000000..1a0704975768 --- /dev/null +++ b/.github/workflows/build-test-macos-wallet-rl_wallet.yml @@ -0,0 +1,93 @@ +name: MacOS wallet-rl_wallet Tests + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: MacOS wallet-rl_wallet Tests + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.8, 3.9] + os: [macOS-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + # Note that new runners may break this https://github.com/actions/cache/issues/292 + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + BUILD_VDF_CLIENT: "N" + run: | + brew install boost + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test wallet-rl_wallet code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/wallet/rl_wallet/test_rl_wallet.py tests/wallet/rl_wallet/test_rl_rpc.py -s -v --durations 0 diff --git a/.github/workflows/build-test-macos-wallet-rpc.yml b/.github/workflows/build-test-macos-wallet-rpc.yml new file mode 100644 index 000000000000..b1da283bcbe1 --- /dev/null +++ b/.github/workflows/build-test-macos-wallet-rpc.yml @@ -0,0 +1,93 @@ +name: MacOS wallet-rpc Tests + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: MacOS wallet-rpc Tests + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.8, 3.9] + os: [macOS-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + # Note that new runners may break this https://github.com/actions/cache/issues/292 + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + BUILD_VDF_CLIENT: "N" + run: | + brew install boost + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test wallet-rpc code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/wallet/rpc/test_wallet_rpc.py -s -v --durations 0 diff --git a/.github/workflows/build-test-macos-wallet.yml b/.github/workflows/build-test-macos-wallet.yml index ca37d475cb41..4ae65c3152d0 100644 --- a/.github/workflows/build-test-macos-wallet.yml +++ b/.github/workflows/build-test-macos-wallet.yml @@ -1,4 +1,4 @@ -name: MacOS Wallet Tests +name: MacOS wallet Tests on: push: @@ -12,9 +12,9 @@ on: jobs: build: - name: MacOS Wallet Tests + name: MacOS wallet Tests runs-on: ${{ matrix.os }} - timeout-minutes: 50 + timeout-minutes: 30 strategy: fail-fast: false max-parallel: 4 @@ -85,14 +85,9 @@ jobs: - name: Install developer requirements run: | . ./activate - venv/bin/python -m pip install pytest pytest-asyncio - - - name: Test clvm code with pytest - run: | - . ./activate - ./venv/bin/py.test tests/clvm -v --durations 0 + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist - name: Test wallet code with pytest run: | . ./activate - ./venv/bin/py.test tests/wallet -v --durations 0 + ./venv/bin/py.test tests/wallet/test_bech32m.py tests/wallet/test_wallet_sync.py tests/wallet/test_puzzle_store.py tests/wallet/test_wallet_store.py tests/wallet/test_taproot.py tests/wallet/test_wallet.py tests/wallet/test_chialisp.py tests/wallet/test_backup.py -s -v --durations 0 diff --git a/.github/workflows/build-test-ubuntu-blockchain.yml b/.github/workflows/build-test-ubuntu-blockchain.yml index 95eb6395dff6..1b70f162f244 100644 --- a/.github/workflows/build-test-ubuntu-blockchain.yml +++ b/.github/workflows/build-test-ubuntu-blockchain.yml @@ -1,4 +1,4 @@ -name: Ubuntu Blockchain Tests +name: Ubuntu blockchain Test on: push: @@ -12,9 +12,9 @@ on: jobs: build: - name: Ubuntu Blockchain Tests + name: Ubuntu blockchain Test runs-on: ${{ matrix.os }} - timeout-minutes: 90 + timeout-minutes: 60 strategy: fail-fast: false max-parallel: 4 @@ -97,9 +97,9 @@ jobs: - name: Install developer requirements run: | . ./activate - venv/bin/python -m pip install pytest pytest-asyncio + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist - name: Test blockchain code with pytest run: | . ./activate - ./venv/bin/py.test tests/blockchain -s -v --durations 0 + ./venv/bin/py.test tests/blockchain/test_blockchain_transactions.py tests/blockchain/test_blockchain.py tests/blockchain/test_weight_proof.py -s -v --durations 0 diff --git a/.github/workflows/build-test-ubuntu-clvm.yml b/.github/workflows/build-test-ubuntu-clvm.yml new file mode 100644 index 000000000000..736f48496853 --- /dev/null +++ b/.github/workflows/build-test-ubuntu-clvm.yml @@ -0,0 +1,95 @@ +name: Ubuntu clvm Test + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: Ubuntu clvm Test + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9] + os: [ubuntu-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache npm + uses: actions/cache@v2.1.4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Install ubuntu dependencies + run: | + sudo apt-get install software-properties-common + sudo add-apt-repository ppa:deadsnakes/ppa + sudo apt-get update + sudo apt-get install python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-distutils git -y + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + run: | + sh install.sh + + + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test clvm code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/clvm/test_puzzles.py tests/clvm/test_serialized_program.py tests/clvm/test_clvm_compilation.py tests/clvm/test_chialisp_deserialization.py -s -v --durations 0 -n auto diff --git a/.github/workflows/build-test-ubuntu-core-consensus.yml b/.github/workflows/build-test-ubuntu-core-consensus.yml new file mode 100644 index 000000000000..7a32e4c26ad9 --- /dev/null +++ b/.github/workflows/build-test-ubuntu-core-consensus.yml @@ -0,0 +1,105 @@ +name: Ubuntu core-consensus Test + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: Ubuntu core-consensus Test + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9] + os: [ubuntu-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache npm + uses: actions/cache@v2.1.4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Install ubuntu dependencies + run: | + sudo apt-get install software-properties-common + sudo add-apt-repository ppa:deadsnakes/ppa + sudo apt-get update + sudo apt-get install python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-distutils git -y + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + run: | + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test core-consensus code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/core/consensus/test_pot_iterations.py -s -v --durations 0 diff --git a/.github/workflows/build-test-ubuntu-core-daemon.yml b/.github/workflows/build-test-ubuntu-core-daemon.yml new file mode 100644 index 000000000000..316e3d342f6c --- /dev/null +++ b/.github/workflows/build-test-ubuntu-core-daemon.yml @@ -0,0 +1,105 @@ +name: Ubuntu core-daemon Test + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: Ubuntu core-daemon Test + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9] + os: [ubuntu-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache npm + uses: actions/cache@v2.1.4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Install ubuntu dependencies + run: | + sudo apt-get install software-properties-common + sudo add-apt-repository ppa:deadsnakes/ppa + sudo apt-get update + sudo apt-get install python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-distutils git -y + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + run: | + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test core-daemon code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/core/daemon/test_daemon_alerts.py -s -v --durations 0 diff --git a/.github/workflows/build-test-ubuntu-core-full_node.yml b/.github/workflows/build-test-ubuntu-core-full_node.yml new file mode 100644 index 000000000000..317a30c6cd8e --- /dev/null +++ b/.github/workflows/build-test-ubuntu-core-full_node.yml @@ -0,0 +1,105 @@ +name: Ubuntu core-full_node Test + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: Ubuntu core-full_node Test + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9] + os: [ubuntu-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache npm + uses: actions/cache@v2.1.4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Install ubuntu dependencies + run: | + sudo apt-get install software-properties-common + sudo add-apt-repository ppa:deadsnakes/ppa + sudo apt-get update + sudo apt-get install python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-distutils git -y + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + run: | + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test core-full_node code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/core/full_node/test_transactions.py tests/core/full_node/test_full_node_store.py tests/core/full_node/test_initial_freeze.py tests/core/full_node/test_address_manager.py tests/core/full_node/test_sync_store.py tests/core/full_node/test_node_load.py tests/core/full_node/test_mempool.py tests/core/full_node/test_mempool_performance.py tests/core/full_node/test_coin_store.py tests/core/full_node/test_block_store.py tests/core/full_node/test_full_sync.py tests/core/full_node/test_full_node.py -s -v --durations 0 diff --git a/.github/workflows/build-test-ubuntu-core-server.yml b/.github/workflows/build-test-ubuntu-core-server.yml new file mode 100644 index 000000000000..6f7047231710 --- /dev/null +++ b/.github/workflows/build-test-ubuntu-core-server.yml @@ -0,0 +1,105 @@ +name: Ubuntu core-server Test + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: Ubuntu core-server Test + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9] + os: [ubuntu-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache npm + uses: actions/cache@v2.1.4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Install ubuntu dependencies + run: | + sudo apt-get install software-properties-common + sudo add-apt-repository ppa:deadsnakes/ppa + sudo apt-get update + sudo apt-get install python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-distutils git -y + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + run: | + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test core-server code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/core/server/test_dos.py tests/core/server/test_rate_limits.py -s -v --durations 0 diff --git a/.github/workflows/build-test-ubuntu-core-ssl.yml b/.github/workflows/build-test-ubuntu-core-ssl.yml new file mode 100644 index 000000000000..77a3549157ec --- /dev/null +++ b/.github/workflows/build-test-ubuntu-core-ssl.yml @@ -0,0 +1,105 @@ +name: Ubuntu core-ssl Test + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: Ubuntu core-ssl Test + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9] + os: [ubuntu-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache npm + uses: actions/cache@v2.1.4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Install ubuntu dependencies + run: | + sudo apt-get install software-properties-common + sudo add-apt-repository ppa:deadsnakes/ppa + sudo apt-get update + sudo apt-get install python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-distutils git -y + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + run: | + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test core-ssl code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/core/ssl/test_ssl.py -s -v --durations 0 diff --git a/.github/workflows/build-test-ubuntu-core-types.yml b/.github/workflows/build-test-ubuntu-core-types.yml new file mode 100644 index 000000000000..7486f7f2c799 --- /dev/null +++ b/.github/workflows/build-test-ubuntu-core-types.yml @@ -0,0 +1,105 @@ +name: Ubuntu core-types Test + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: Ubuntu core-types Test + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9] + os: [ubuntu-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache npm + uses: actions/cache@v2.1.4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Install ubuntu dependencies + run: | + sudo apt-get install software-properties-common + sudo add-apt-repository ppa:deadsnakes/ppa + sudo apt-get update + sudo apt-get install python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-distutils git -y + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + run: | + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test core-types code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/core/types/test_proof_of_space.py -s -v --durations 0 diff --git a/.github/workflows/build-test-ubuntu-core-util.yml b/.github/workflows/build-test-ubuntu-core-util.yml new file mode 100644 index 000000000000..8206a0d21374 --- /dev/null +++ b/.github/workflows/build-test-ubuntu-core-util.yml @@ -0,0 +1,105 @@ +name: Ubuntu core-util Test + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: Ubuntu core-util Test + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9] + os: [ubuntu-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache npm + uses: actions/cache@v2.1.4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Install ubuntu dependencies + run: | + sudo apt-get install software-properties-common + sudo add-apt-repository ppa:deadsnakes/ppa + sudo apt-get update + sudo apt-get install python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-distutils git -y + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + run: | + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test core-util code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/core/util/test_streamable.py tests/core/util/test_significant_bits.py tests/core/util/test_keychain.py tests/core/util/test_type_checking.py -s -v --durations 0 diff --git a/.github/workflows/build-test-ubuntu-core.yml b/.github/workflows/build-test-ubuntu-core.yml index 53af7fcd4a49..2ee5483be644 100644 --- a/.github/workflows/build-test-ubuntu-core.yml +++ b/.github/workflows/build-test-ubuntu-core.yml @@ -1,4 +1,4 @@ -name: Ubuntu Core Tests +name: Ubuntu core Test on: push: @@ -12,9 +12,9 @@ on: jobs: build: - name: Ubuntu Core Tests + name: Ubuntu core Test runs-on: ${{ matrix.os }} - timeout-minutes: 90 + timeout-minutes: 30 strategy: fail-fast: false max-parallel: 4 @@ -97,9 +97,9 @@ jobs: - name: Install developer requirements run: | . ./activate - venv/bin/python -m pip install pytest pytest-asyncio + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist - name: Test core code with pytest run: | . ./activate - ./venv/bin/py.test tests/core -v --durations 0 + ./venv/bin/py.test tests/core/test_setproctitle.py tests/core/test_cost_calculation.py tests/core/test_full_node_rpc.py tests/core/test_farmer_harvester_rpc.py tests/core/test_merkle_set.py tests/core/test_filter.py -s -v --durations 0 diff --git a/.github/workflows/build-test-ubuntu-simulation.yml b/.github/workflows/build-test-ubuntu-simulation.yml index 1663cada80b1..3494de81e2af 100644 --- a/.github/workflows/build-test-ubuntu-simulation.yml +++ b/.github/workflows/build-test-ubuntu-simulation.yml @@ -1,4 +1,4 @@ -name: Ubuntu Simulation Tests +name: Ubuntu simulation Test on: push: @@ -12,9 +12,9 @@ on: jobs: build: - name: Ubuntu Simulation Tests + name: Ubuntu simulation Test runs-on: ${{ matrix.os }} - timeout-minutes: 90 + timeout-minutes: 30 strategy: fail-fast: false max-parallel: 4 @@ -97,9 +97,9 @@ jobs: - name: Install developer requirements run: | . ./activate - venv/bin/python -m pip install pytest pytest-asyncio + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist - name: Test simulation code with pytest run: | . ./activate - ./venv/bin/py.test tests/simulation -s -v --durations 0 + ./venv/bin/py.test tests/simulation/test_simulation.py -s -v --durations 0 diff --git a/.github/workflows/build-test-ubuntu-util.yml b/.github/workflows/build-test-ubuntu-util.yml new file mode 100644 index 000000000000..5266b7ccadcd --- /dev/null +++ b/.github/workflows/build-test-ubuntu-util.yml @@ -0,0 +1,105 @@ +name: Ubuntu util Test + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: Ubuntu util Test + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9] + os: [ubuntu-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache npm + uses: actions/cache@v2.1.4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Install ubuntu dependencies + run: | + sudo apt-get install software-properties-common + sudo add-apt-repository ppa:deadsnakes/ppa + sudo apt-get update + sudo apt-get install python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-distutils git -y + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + run: | + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test util code with pytest + run: | + . ./activate + ./venv/bin/py.test -s -v --durations 0 diff --git a/.github/workflows/build-test-ubuntu-wallet-cc_wallet.yml b/.github/workflows/build-test-ubuntu-wallet-cc_wallet.yml new file mode 100644 index 000000000000..9ec1bc6a7998 --- /dev/null +++ b/.github/workflows/build-test-ubuntu-wallet-cc_wallet.yml @@ -0,0 +1,105 @@ +name: Ubuntu wallet-cc_wallet Test + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: Ubuntu wallet-cc_wallet Test + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9] + os: [ubuntu-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache npm + uses: actions/cache@v2.1.4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Install ubuntu dependencies + run: | + sudo apt-get install software-properties-common + sudo add-apt-repository ppa:deadsnakes/ppa + sudo apt-get update + sudo apt-get install python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-distutils git -y + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + run: | + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test wallet-cc_wallet code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/wallet/cc_wallet/test_cc_wallet.py tests/wallet/cc_wallet/test_trades.py -s -v --durations 0 diff --git a/.github/workflows/build-test-ubuntu-wallet-rl_wallet.yml b/.github/workflows/build-test-ubuntu-wallet-rl_wallet.yml new file mode 100644 index 000000000000..97b61dc17f22 --- /dev/null +++ b/.github/workflows/build-test-ubuntu-wallet-rl_wallet.yml @@ -0,0 +1,105 @@ +name: Ubuntu wallet-rl_wallet Test + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: Ubuntu wallet-rl_wallet Test + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9] + os: [ubuntu-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache npm + uses: actions/cache@v2.1.4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Install ubuntu dependencies + run: | + sudo apt-get install software-properties-common + sudo add-apt-repository ppa:deadsnakes/ppa + sudo apt-get update + sudo apt-get install python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-distutils git -y + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + run: | + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test wallet-rl_wallet code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/wallet/rl_wallet/test_rl_wallet.py tests/wallet/rl_wallet/test_rl_rpc.py -s -v --durations 0 diff --git a/.github/workflows/build-test-ubuntu-wallet-rpc.yml b/.github/workflows/build-test-ubuntu-wallet-rpc.yml new file mode 100644 index 000000000000..1d67fa028473 --- /dev/null +++ b/.github/workflows/build-test-ubuntu-wallet-rpc.yml @@ -0,0 +1,105 @@ +name: Ubuntu wallet-rpc Test + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: Ubuntu wallet-rpc Test + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9] + os: [ubuntu-latest] + + steps: + - name: Cancel previous runs on the same branch + if: ${{ github.ref != 'refs/heads/dev' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache npm + uses: actions/cache@v2.1.4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip + uses: actions/cache@v2.1.4 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Checkout test blocks and plots + uses: actions/checkout@v2 + with: + repository: 'Chia-Network/test-cache' + path: '.chia' + ref: '0.24.0' + fetch-depth: 1 + + - name: Link home directory + run: | + cd $HOME + ln -s $GITHUB_WORKSPACE/.chia + echo "$HOME/.chia" + ls -al $HOME/.chia + + - name: Install ubuntu dependencies + run: | + sudo apt-get install software-properties-common + sudo add-apt-repository ppa:deadsnakes/ppa + sudo apt-get update + sudo apt-get install python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-distutils git -y + + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + run: | + sh install.sh + + - name: Install timelord + run: | + . ./activate + sh install-timelord.sh + ./vdf_bench square_asm 400000 + + - name: Install developer requirements + run: | + . ./activate + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist + + - name: Test wallet-rpc code with pytest + run: | + . ./activate + ./venv/bin/py.test tests/wallet/rpc/test_wallet_rpc.py -s -v --durations 0 diff --git a/.github/workflows/build-test-ubuntu-wallet.yml b/.github/workflows/build-test-ubuntu-wallet.yml index d182aa61c78a..b7b24af5c552 100644 --- a/.github/workflows/build-test-ubuntu-wallet.yml +++ b/.github/workflows/build-test-ubuntu-wallet.yml @@ -1,4 +1,4 @@ -name: Ubuntu Wallet Test +name: Ubuntu wallet Test on: push: @@ -12,9 +12,9 @@ on: jobs: build: - name: Ubuntu Wallet Test + name: Ubuntu wallet Test runs-on: ${{ matrix.os }} - timeout-minutes: 50 + timeout-minutes: 30 strategy: fail-fast: false max-parallel: 4 @@ -97,14 +97,9 @@ jobs: - name: Install developer requirements run: | . ./activate - venv/bin/python -m pip install pytest pytest-asyncio - - - name: Test clvm code with pytest - run: | - . ./activate - ./venv/bin/py.test tests/clvm -s -v --durations 0 + venv/bin/python -m pip install pytest pytest-asyncio pytest-xdist - name: Test wallet code with pytest run: | . ./activate - ./venv/bin/py.test tests/wallet -s -v --durations 0 + ./venv/bin/py.test tests/wallet/test_bech32m.py tests/wallet/test_wallet_sync.py tests/wallet/test_puzzle_store.py tests/wallet/test_wallet_store.py tests/wallet/test_taproot.py tests/wallet/test_wallet.py tests/wallet/test_chialisp.py tests/wallet/test_backup.py -s -v --durations 0