From 1981882a9be4a4237d1baa621aa446c661de7024 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 31 May 2022 20:09:22 -0400 Subject: [PATCH 01/21] reusable workflow for a single test workflow with coverage collection --- .../workflows/build-test-macos-blockchain.yml | 125 -------- .github/workflows/build-test-macos-clvm.yml | 104 ------- .../workflows/build-test-macos-core-cmds.yml | 104 ------- .../build-test-macos-core-consensus.yml | 104 ------- .../build-test-macos-core-custom_types.yml | 104 ------- .../build-test-macos-core-daemon.yml | 129 --------- ...ld-test-macos-core-full_node-full_sync.yml | 125 -------- ...build-test-macos-core-full_node-stores.yml | 125 -------- .../build-test-macos-core-full_node.yml | 125 -------- .../build-test-macos-core-server.yml | 125 -------- .../workflows/build-test-macos-core-ssl.yml | 125 -------- .../workflows/build-test-macos-core-util.yml | 125 -------- .github/workflows/build-test-macos-core.yml | 125 -------- .../build-test-macos-farmer_harvester.yml | 125 -------- .../workflows/build-test-macos-generator.yml | 104 ------- .../workflows/build-test-macos-plot_sync.yml | 125 -------- .../workflows/build-test-macos-plotting.yml | 125 -------- .github/workflows/build-test-macos-pools.yml | 125 -------- .../workflows/build-test-macos-simulation.yml | 129 --------- .github/workflows/build-test-macos-tools.yml | 104 ------- .github/workflows/build-test-macos-util.yml | 104 ------- .../build-test-macos-wallet-cat_wallet.yml | 125 -------- .../build-test-macos-wallet-did_wallet.yml | 104 ------- .../build-test-macos-wallet-rl_wallet.yml | 104 ------- .../workflows/build-test-macos-wallet-rpc.yml | 125 -------- .../build-test-macos-wallet-simple_sync.yml | 125 -------- .../build-test-macos-wallet-sync.yml | 125 -------- .github/workflows/build-test-macos-wallet.yml | 125 -------- .../build-test-macos-weight_proof.yml | 125 -------- .../build-test-ubuntu-blockchain.yml | 127 -------- .github/workflows/build-test-ubuntu-clvm.yml | 106 ------- .../workflows/build-test-ubuntu-core-cmds.yml | 106 ------- .../build-test-ubuntu-core-consensus.yml | 106 ------- .../build-test-ubuntu-core-custom_types.yml | 106 ------- .../build-test-ubuntu-core-daemon.yml | 131 --------- ...d-test-ubuntu-core-full_node-full_sync.yml | 127 -------- ...uild-test-ubuntu-core-full_node-stores.yml | 130 --------- .../build-test-ubuntu-core-full_node.yml | 130 --------- .../build-test-ubuntu-core-server.yml | 127 -------- .../workflows/build-test-ubuntu-core-ssl.yml | 127 -------- .../workflows/build-test-ubuntu-core-util.yml | 127 -------- .github/workflows/build-test-ubuntu-core.yml | 127 -------- .../build-test-ubuntu-farmer_harvester.yml | 127 -------- .../workflows/build-test-ubuntu-generator.yml | 106 ------- .../workflows/build-test-ubuntu-plot_sync.yml | 127 -------- .../workflows/build-test-ubuntu-plotting.yml | 127 -------- .github/workflows/build-test-ubuntu-pools.yml | 127 -------- .../build-test-ubuntu-simulation.yml | 131 --------- .github/workflows/build-test-ubuntu-tools.yml | 106 ------- .github/workflows/build-test-ubuntu-util.yml | 106 ------- .../build-test-ubuntu-wallet-cat_wallet.yml | 127 -------- .../build-test-ubuntu-wallet-did_wallet.yml | 106 ------- .../build-test-ubuntu-wallet-rl_wallet.yml | 106 ------- .../build-test-ubuntu-wallet-rpc.yml | 127 -------- .../build-test-ubuntu-wallet-simple_sync.yml | 127 -------- .../build-test-ubuntu-wallet-sync.yml | 127 -------- .../workflows/build-test-ubuntu-wallet.yml | 127 -------- .../build-test-ubuntu-weight_proof.yml | 127 -------- .../build-test-windows-blockchain.yml | 129 --------- .github/workflows/build-test-windows-clvm.yml | 108 ------- .../build-test-windows-core-cmds.yml | 108 ------- .../build-test-windows-core-consensus.yml | 108 ------- .../build-test-windows-core-custom_types.yml | 108 ------- .../build-test-windows-core-daemon.yml | 133 --------- ...-test-windows-core-full_node-full_sync.yml | 129 --------- ...ild-test-windows-core-full_node-stores.yml | 129 --------- .../build-test-windows-core-full_node.yml | 129 --------- .../build-test-windows-core-server.yml | 129 --------- .../workflows/build-test-windows-core-ssl.yml | 129 --------- .../build-test-windows-core-util.yml | 129 --------- .github/workflows/build-test-windows-core.yml | 129 --------- .../build-test-windows-farmer_harvester.yml | 129 --------- .../build-test-windows-generator.yml | 108 ------- .../build-test-windows-plot_sync.yml | 129 --------- .../workflows/build-test-windows-plotting.yml | 129 --------- .../workflows/build-test-windows-pools.yml | 129 --------- .../build-test-windows-simulation.yml | 133 --------- .../workflows/build-test-windows-tools.yml | 108 ------- .github/workflows/build-test-windows-util.yml | 108 ------- .../build-test-windows-wallet-cat_wallet.yml | 129 --------- .../build-test-windows-wallet-did_wallet.yml | 108 ------- .../build-test-windows-wallet-rl_wallet.yml | 108 ------- .../build-test-windows-wallet-rpc.yml | 129 --------- .../build-test-windows-wallet-simple_sync.yml | 129 --------- .../build-test-windows-wallet-sync.yml | 129 --------- .../workflows/build-test-windows-wallet.yml | 129 --------- .../build-test-windows-weight_proof.yml | 129 --------- .github/workflows/test-single.yml | 272 ++++++++++++++++++ .github/workflows/test.yml | 142 +++++++++ .pre-commit-config.yaml | 6 - tests/build-job-matrix.py | 129 +++++++++ tests/build-workflows.py | 173 ----------- tests/runner_templates/__init__.py | 0 tests/runner_templates/build-test-macos | 104 ------- tests/runner_templates/build-test-ubuntu | 106 ------- tests/runner_templates/build-test-windows | 108 ------- .../check-resource-usage.include.yml | 4 - .../checkout-test-plots.include.yml | 22 -- .../install-timelord.include.yml | 5 - tests/testconfig.py | 2 - 100 files changed, 543 insertions(+), 11042 deletions(-) delete mode 100644 .github/workflows/build-test-macos-blockchain.yml delete mode 100644 .github/workflows/build-test-macos-clvm.yml delete mode 100644 .github/workflows/build-test-macos-core-cmds.yml delete mode 100644 .github/workflows/build-test-macos-core-consensus.yml delete mode 100644 .github/workflows/build-test-macos-core-custom_types.yml delete mode 100644 .github/workflows/build-test-macos-core-daemon.yml delete mode 100644 .github/workflows/build-test-macos-core-full_node-full_sync.yml delete mode 100644 .github/workflows/build-test-macos-core-full_node-stores.yml delete mode 100644 .github/workflows/build-test-macos-core-full_node.yml delete mode 100644 .github/workflows/build-test-macos-core-server.yml delete mode 100644 .github/workflows/build-test-macos-core-ssl.yml delete mode 100644 .github/workflows/build-test-macos-core-util.yml delete mode 100644 .github/workflows/build-test-macos-core.yml delete mode 100644 .github/workflows/build-test-macos-farmer_harvester.yml delete mode 100644 .github/workflows/build-test-macos-generator.yml delete mode 100644 .github/workflows/build-test-macos-plot_sync.yml delete mode 100644 .github/workflows/build-test-macos-plotting.yml delete mode 100644 .github/workflows/build-test-macos-pools.yml delete mode 100644 .github/workflows/build-test-macos-simulation.yml delete mode 100644 .github/workflows/build-test-macos-tools.yml delete mode 100644 .github/workflows/build-test-macos-util.yml delete mode 100644 .github/workflows/build-test-macos-wallet-cat_wallet.yml delete mode 100644 .github/workflows/build-test-macos-wallet-did_wallet.yml delete mode 100644 .github/workflows/build-test-macos-wallet-rl_wallet.yml delete mode 100644 .github/workflows/build-test-macos-wallet-rpc.yml delete mode 100644 .github/workflows/build-test-macos-wallet-simple_sync.yml delete mode 100644 .github/workflows/build-test-macos-wallet-sync.yml delete mode 100644 .github/workflows/build-test-macos-wallet.yml delete mode 100644 .github/workflows/build-test-macos-weight_proof.yml delete mode 100644 .github/workflows/build-test-ubuntu-blockchain.yml delete mode 100644 .github/workflows/build-test-ubuntu-clvm.yml delete mode 100644 .github/workflows/build-test-ubuntu-core-cmds.yml delete mode 100644 .github/workflows/build-test-ubuntu-core-consensus.yml delete mode 100644 .github/workflows/build-test-ubuntu-core-custom_types.yml delete mode 100644 .github/workflows/build-test-ubuntu-core-daemon.yml delete mode 100644 .github/workflows/build-test-ubuntu-core-full_node-full_sync.yml delete mode 100644 .github/workflows/build-test-ubuntu-core-full_node-stores.yml delete mode 100644 .github/workflows/build-test-ubuntu-core-full_node.yml delete mode 100644 .github/workflows/build-test-ubuntu-core-server.yml delete mode 100644 .github/workflows/build-test-ubuntu-core-ssl.yml delete mode 100644 .github/workflows/build-test-ubuntu-core-util.yml delete mode 100644 .github/workflows/build-test-ubuntu-core.yml delete mode 100644 .github/workflows/build-test-ubuntu-farmer_harvester.yml delete mode 100644 .github/workflows/build-test-ubuntu-generator.yml delete mode 100644 .github/workflows/build-test-ubuntu-plot_sync.yml delete mode 100644 .github/workflows/build-test-ubuntu-plotting.yml delete mode 100644 .github/workflows/build-test-ubuntu-pools.yml delete mode 100644 .github/workflows/build-test-ubuntu-simulation.yml delete mode 100644 .github/workflows/build-test-ubuntu-tools.yml delete mode 100644 .github/workflows/build-test-ubuntu-util.yml delete mode 100644 .github/workflows/build-test-ubuntu-wallet-cat_wallet.yml delete mode 100644 .github/workflows/build-test-ubuntu-wallet-did_wallet.yml delete mode 100644 .github/workflows/build-test-ubuntu-wallet-rl_wallet.yml delete mode 100644 .github/workflows/build-test-ubuntu-wallet-rpc.yml delete mode 100644 .github/workflows/build-test-ubuntu-wallet-simple_sync.yml delete mode 100644 .github/workflows/build-test-ubuntu-wallet-sync.yml delete mode 100644 .github/workflows/build-test-ubuntu-wallet.yml delete mode 100644 .github/workflows/build-test-ubuntu-weight_proof.yml delete mode 100644 .github/workflows/build-test-windows-blockchain.yml delete mode 100644 .github/workflows/build-test-windows-clvm.yml delete mode 100644 .github/workflows/build-test-windows-core-cmds.yml delete mode 100644 .github/workflows/build-test-windows-core-consensus.yml delete mode 100644 .github/workflows/build-test-windows-core-custom_types.yml delete mode 100644 .github/workflows/build-test-windows-core-daemon.yml delete mode 100644 .github/workflows/build-test-windows-core-full_node-full_sync.yml delete mode 100644 .github/workflows/build-test-windows-core-full_node-stores.yml delete mode 100644 .github/workflows/build-test-windows-core-full_node.yml delete mode 100644 .github/workflows/build-test-windows-core-server.yml delete mode 100644 .github/workflows/build-test-windows-core-ssl.yml delete mode 100644 .github/workflows/build-test-windows-core-util.yml delete mode 100644 .github/workflows/build-test-windows-core.yml delete mode 100644 .github/workflows/build-test-windows-farmer_harvester.yml delete mode 100644 .github/workflows/build-test-windows-generator.yml delete mode 100644 .github/workflows/build-test-windows-plot_sync.yml delete mode 100644 .github/workflows/build-test-windows-plotting.yml delete mode 100644 .github/workflows/build-test-windows-pools.yml delete mode 100644 .github/workflows/build-test-windows-simulation.yml delete mode 100644 .github/workflows/build-test-windows-tools.yml delete mode 100644 .github/workflows/build-test-windows-util.yml delete mode 100644 .github/workflows/build-test-windows-wallet-cat_wallet.yml delete mode 100644 .github/workflows/build-test-windows-wallet-did_wallet.yml delete mode 100644 .github/workflows/build-test-windows-wallet-rl_wallet.yml delete mode 100644 .github/workflows/build-test-windows-wallet-rpc.yml delete mode 100644 .github/workflows/build-test-windows-wallet-simple_sync.yml delete mode 100644 .github/workflows/build-test-windows-wallet-sync.yml delete mode 100644 .github/workflows/build-test-windows-wallet.yml delete mode 100644 .github/workflows/build-test-windows-weight_proof.yml create mode 100644 .github/workflows/test-single.yml create mode 100644 .github/workflows/test.yml create mode 100644 tests/build-job-matrix.py delete mode 100755 tests/build-workflows.py delete mode 100644 tests/runner_templates/__init__.py delete mode 100644 tests/runner_templates/build-test-macos delete mode 100644 tests/runner_templates/build-test-ubuntu delete mode 100644 tests/runner_templates/build-test-windows delete mode 100644 tests/runner_templates/check-resource-usage.include.yml delete mode 100644 tests/runner_templates/checkout-test-plots.include.yml delete mode 100644 tests/runner_templates/install-timelord.include.yml diff --git a/.github/workflows/build-test-macos-blockchain.yml b/.github/workflows/build-test-macos-blockchain.yml deleted file mode 100644 index 380288bf0510..000000000000 --- a/.github/workflows/build-test-macos-blockchain.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS blockchain Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS blockchain Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 60 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_blockchain - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test blockchain code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/blockchain/test_blockchain.py tests/blockchain/test_blockchain_transactions.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-clvm.yml b/.github/workflows/build-test-macos-clvm.yml deleted file mode 100644 index b40dc953e2f2..000000000000 --- a/.github/workflows/build-test-macos-clvm.yml +++ /dev/null @@ -1,104 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS clvm Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS clvm Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_clvm - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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- - -# Omitted checking out blocks and plots repo Chia-Network/test-cache - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test clvm code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/clvm/test_chialisp_deserialization.py tests/clvm/test_clvm_compilation.py tests/clvm/test_clvm_step.py tests/clvm/test_program.py tests/clvm/test_puzzle_compression.py tests/clvm/test_puzzle_drivers.py tests/clvm/test_puzzles.py tests/clvm/test_serialized_program.py tests/clvm/test_singletons.py tests/clvm/test_spend_sim.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-core-cmds.yml b/.github/workflows/build-test-macos-core-cmds.yml deleted file mode 100644 index ba1d2e11b9ee..000000000000 --- a/.github/workflows/build-test-macos-core-cmds.yml +++ /dev/null @@ -1,104 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS core-cmds Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS core-cmds Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-cmds - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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- - -# Omitted checking out blocks and plots repo Chia-Network/test-cache - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test core-cmds code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/core/cmds/test_keys.py tests/core/cmds/test_wallet.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-core-consensus.yml b/.github/workflows/build-test-macos-core-consensus.yml deleted file mode 100644 index b71db9933a64..000000000000 --- a/.github/workflows/build-test-macos-core-consensus.yml +++ /dev/null @@ -1,104 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS core-consensus Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS core-consensus Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-consensus - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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- - -# Omitted checking out blocks and plots repo Chia-Network/test-cache - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test core-consensus code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/core/consensus/test_pot_iterations.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-core-custom_types.yml b/.github/workflows/build-test-macos-core-custom_types.yml deleted file mode 100644 index e2cb0df0e43a..000000000000 --- a/.github/workflows/build-test-macos-core-custom_types.yml +++ /dev/null @@ -1,104 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS core-custom_types Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS core-custom_types Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-custom_types - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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- - -# Omitted checking out blocks and plots repo Chia-Network/test-cache - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test core-custom_types code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/core/custom_types/test_coin.py tests/core/custom_types/test_proof_of_space.py tests/core/custom_types/test_spend_bundle.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-core-daemon.yml b/.github/workflows/build-test-macos-core-daemon.yml deleted file mode 100644 index bdbedf2f1256..000000000000 --- a/.github/workflows/build-test-macos-core-daemon.yml +++ /dev/null @@ -1,129 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS core-daemon Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS core-daemon Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-daemon - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - - - name: Install timelord - run: | - . ./activate - sh install-timelord.sh -n - ./vdf_bench square_asm 400000 - - - name: Test core-daemon code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 0 -m "not benchmark" tests/core/daemon/test_daemon.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-core-full_node-full_sync.yml b/.github/workflows/build-test-macos-core-full_node-full_sync.yml deleted file mode 100644 index c2e15bfd5636..000000000000 --- a/.github/workflows/build-test-macos-core-full_node-full_sync.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS core-full_node-full_sync Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS core-full_node-full_sync Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 60 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-full_node-full_sync - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test core-full_node-full_sync code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/core/full_node/full_sync/test_full_sync.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-core-full_node-stores.yml b/.github/workflows/build-test-macos-core-full_node-stores.yml deleted file mode 100644 index 4239950e2106..000000000000 --- a/.github/workflows/build-test-macos-core-full_node-stores.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS core-full_node-stores Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS core-full_node-stores Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 40 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-full_node-stores - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test core-full_node-stores code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/core/full_node/stores/test_block_store.py tests/core/full_node/stores/test_coin_store.py tests/core/full_node/stores/test_full_node_store.py tests/core/full_node/stores/test_hint_store.py tests/core/full_node/stores/test_sync_store.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-core-full_node.yml b/.github/workflows/build-test-macos-core-full_node.yml deleted file mode 100644 index 192ead7a1da4..000000000000 --- a/.github/workflows/build-test-macos-core-full_node.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS core-full_node Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS core-full_node Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 50 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-full_node - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test core-full_node code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/core/full_node/test_address_manager.py tests/core/full_node/test_block_height_map.py tests/core/full_node/test_conditions.py tests/core/full_node/test_full_node.py tests/core/full_node/test_generator_tools.py tests/core/full_node/test_hint_management.py tests/core/full_node/test_mempool.py tests/core/full_node/test_mempool_performance.py tests/core/full_node/test_node_load.py tests/core/full_node/test_peer_store_resolver.py tests/core/full_node/test_performance.py tests/core/full_node/test_transactions.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-core-server.yml b/.github/workflows/build-test-macos-core-server.yml deleted file mode 100644 index c9c373299231..000000000000 --- a/.github/workflows/build-test-macos-core-server.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS core-server Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS core-server Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-server - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test core-server code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 0 -m "not benchmark" tests/core/server/test_dos.py tests/core/server/test_rate_limits.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-core-ssl.yml b/.github/workflows/build-test-macos-core-ssl.yml deleted file mode 100644 index 95db9d247a64..000000000000 --- a/.github/workflows/build-test-macos-core-ssl.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS core-ssl Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS core-ssl Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-ssl - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test core-ssl code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/core/ssl/test_ssl.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-core-util.yml b/.github/workflows/build-test-macos-core-util.yml deleted file mode 100644 index c7628a1ec4fb..000000000000 --- a/.github/workflows/build-test-macos-core-util.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS core-util Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS core-util Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-util - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test core-util code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/core/util/test_cached_bls.py tests/core/util/test_config.py tests/core/util/test_db_wrapper.py tests/core/util/test_file_keyring_synchronization.py tests/core/util/test_files.py tests/core/util/test_jsonify.py tests/core/util/test_keychain.py tests/core/util/test_keyring_wrapper.py tests/core/util/test_lru_cache.py tests/core/util/test_significant_bits.py tests/core/util/test_streamable.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-core.yml b/.github/workflows/build-test-macos-core.yml deleted file mode 100644 index 879f7ef144b9..000000000000 --- a/.github/workflows/build-test-macos-core.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS core Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS core Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test core code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/core/test_coins.py tests/core/test_cost_calculation.py tests/core/test_crawler_rpc.py tests/core/test_daemon_rpc.py tests/core/test_db_conversion.py tests/core/test_db_validation.py tests/core/test_farmer_harvester_rpc.py tests/core/test_filter.py tests/core/test_full_node_rpc.py tests/core/test_merkle_set.py tests/core/test_setproctitle.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-farmer_harvester.yml b/.github/workflows/build-test-macos-farmer_harvester.yml deleted file mode 100644 index cbfba8f560d8..000000000000 --- a/.github/workflows/build-test-macos-farmer_harvester.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS farmer_harvester Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS farmer_harvester Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_farmer_harvester - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test farmer_harvester code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 0 -m "not benchmark" tests/farmer_harvester/test_farmer_harvester.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-generator.yml b/.github/workflows/build-test-macos-generator.yml deleted file mode 100644 index 4a4deb4109cf..000000000000 --- a/.github/workflows/build-test-macos-generator.yml +++ /dev/null @@ -1,104 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS generator Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS generator Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_generator - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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- - -# Omitted checking out blocks and plots repo Chia-Network/test-cache - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test generator code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/generator/test_compression.py tests/generator/test_generator_types.py tests/generator/test_list_to_batches.py tests/generator/test_rom.py tests/generator/test_scan.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-plot_sync.yml b/.github/workflows/build-test-macos-plot_sync.yml deleted file mode 100644 index 8e30928bfc65..000000000000 --- a/.github/workflows/build-test-macos-plot_sync.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS plot_sync Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS plot_sync Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_plot_sync - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test plot_sync code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/plot_sync/test_delta.py tests/plot_sync/test_plot_sync.py tests/plot_sync/test_receiver.py tests/plot_sync/test_sender.py tests/plot_sync/test_sync_simulated.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-plotting.yml b/.github/workflows/build-test-macos-plotting.yml deleted file mode 100644 index 8a7321c6c5be..000000000000 --- a/.github/workflows/build-test-macos-plotting.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS plotting Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS plotting Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_plotting - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test plotting code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/plotting/test_plot_manager.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-pools.yml b/.github/workflows/build-test-macos-pools.yml deleted file mode 100644 index 36acc5a5cf16..000000000000 --- a/.github/workflows/build-test-macos-pools.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS pools Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS pools Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 60 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_pools - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test pools code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 2 -m "not benchmark" tests/pools/test_pool_cmdline.py tests/pools/test_pool_config.py tests/pools/test_pool_puzzles_lifecycle.py tests/pools/test_pool_rpc.py tests/pools/test_pool_wallet.py tests/pools/test_wallet_pool_store.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-simulation.yml b/.github/workflows/build-test-macos-simulation.yml deleted file mode 100644 index 44c020d00a8f..000000000000 --- a/.github/workflows/build-test-macos-simulation.yml +++ /dev/null @@ -1,129 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS simulation Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS simulation Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 60 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_simulation - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - - - name: Install timelord - run: | - . ./activate - sh install-timelord.sh -n - ./vdf_bench square_asm 400000 - - - name: Test simulation code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 0 -m "not benchmark" tests/simulation/test_simulation.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-tools.yml b/.github/workflows/build-test-macos-tools.yml deleted file mode 100644 index 76bbbb3ec4c1..000000000000 --- a/.github/workflows/build-test-macos-tools.yml +++ /dev/null @@ -1,104 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS tools Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS tools Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_tools - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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- - -# Omitted checking out blocks and plots repo Chia-Network/test-cache - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test tools code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/tools/test_full_sync.py tests/tools/test_run_block.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-util.yml b/.github/workflows/build-test-macos-util.yml deleted file mode 100644 index 0b955997706c..000000000000 --- a/.github/workflows/build-test-macos-util.yml +++ /dev/null @@ -1,104 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS util Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS util Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 60 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_util - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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- - -# Omitted checking out blocks and plots repo Chia-Network/test-cache - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test util code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/util/test_chunks.py tests/util/test_full_block_utils.py tests/util/test_lock_queue.py tests/util/test_misc.py tests/util/test_network.py tests/util/test_network_protocol_files.py tests/util/test_paginator.py tests/util/test_struct_stream.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-wallet-cat_wallet.yml b/.github/workflows/build-test-macos-wallet-cat_wallet.yml deleted file mode 100644 index ee50274fbf5e..000000000000 --- a/.github/workflows/build-test-macos-wallet-cat_wallet.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS wallet-cat_wallet Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS wallet-cat_wallet Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 50 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-cat_wallet - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test wallet-cat_wallet code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 0 -m "not benchmark" tests/wallet/cat_wallet/test_cat_lifecycle.py tests/wallet/cat_wallet/test_cat_wallet.py tests/wallet/cat_wallet/test_offer_lifecycle.py tests/wallet/cat_wallet/test_trades.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-wallet-did_wallet.yml b/.github/workflows/build-test-macos-wallet-did_wallet.yml deleted file mode 100644 index 99750a5f29a8..000000000000 --- a/.github/workflows/build-test-macos-wallet-did_wallet.yml +++ /dev/null @@ -1,104 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS wallet-did_wallet Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS wallet-did_wallet Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-did_wallet - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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- - -# Omitted checking out blocks and plots repo Chia-Network/test-cache - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test wallet-did_wallet code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 0 -m "not benchmark" tests/wallet/did_wallet/test_did.py tests/wallet/did_wallet/test_did_rpc.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-wallet-rl_wallet.yml b/.github/workflows/build-test-macos-wallet-rl_wallet.yml deleted file mode 100644 index 37992f513da4..000000000000 --- a/.github/workflows/build-test-macos-wallet-rl_wallet.yml +++ /dev/null @@ -1,104 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS wallet-rl_wallet Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS wallet-rl_wallet Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-rl_wallet - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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- - -# Omitted checking out blocks and plots repo Chia-Network/test-cache - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test wallet-rl_wallet code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 0 -m "not benchmark" tests/wallet/rl_wallet/test_rl_rpc.py tests/wallet/rl_wallet/test_rl_wallet.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-wallet-rpc.yml b/.github/workflows/build-test-macos-wallet-rpc.yml deleted file mode 100644 index 15f3cc0afcba..000000000000 --- a/.github/workflows/build-test-macos-wallet-rpc.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS wallet-rpc Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS wallet-rpc Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-rpc - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test wallet-rpc code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 0 -m "not benchmark" tests/wallet/rpc/test_wallet_rpc.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-wallet-simple_sync.yml b/.github/workflows/build-test-macos-wallet-simple_sync.yml deleted file mode 100644 index b2e9f7e8a787..000000000000 --- a/.github/workflows/build-test-macos-wallet-simple_sync.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS wallet-simple_sync Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS wallet-simple_sync Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-simple_sync - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test wallet-simple_sync code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 0 -m "not benchmark" tests/wallet/simple_sync/test_simple_sync_protocol.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-wallet-sync.yml b/.github/workflows/build-test-macos-wallet-sync.yml deleted file mode 100644 index 4d3ce576ad5b..000000000000 --- a/.github/workflows/build-test-macos-wallet-sync.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS wallet-sync Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS wallet-sync Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 60 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-sync - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test wallet-sync code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 0 -m "not benchmark" tests/wallet/sync/test_wallet_sync.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-wallet.yml b/.github/workflows/build-test-macos-wallet.yml deleted file mode 100644 index c8afc10d5da9..000000000000 --- a/.github/workflows/build-test-macos-wallet.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS wallet Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS wallet Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 40 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test wallet code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/wallet/test_bech32m.py tests/wallet/test_chialisp.py tests/wallet/test_coin_selection.py tests/wallet/test_puzzle_store.py tests/wallet/test_singleton.py tests/wallet/test_singleton_lifecycle.py tests/wallet/test_singleton_lifecycle_fast.py tests/wallet/test_taproot.py tests/wallet/test_wallet.py tests/wallet/test_wallet_blockchain.py tests/wallet/test_wallet_interested_store.py tests/wallet/test_wallet_key_val_store.py tests/wallet/test_wallet_retry.py tests/wallet/test_wallet_store.py tests/wallet/test_wallet_user_store.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-macos-weight_proof.yml b/.github/workflows/build-test-macos-weight_proof.yml deleted file mode 100644 index c09c039fc060..000000000000 --- a/.github/workflows/build-test-macos-weight_proof.yml +++ /dev/null @@ -1,125 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS weight_proof Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS weight_proof Tests - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_weight_proof - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -# Omitted installing Timelord - - - name: Test weight_proof code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/weight_proof/test_weight_proof.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-ubuntu-blockchain.yml b/.github/workflows/build-test-ubuntu-blockchain.yml deleted file mode 100644 index 30aa4b83f320..000000000000 --- a/.github/workflows/build-test-ubuntu-blockchain.yml +++ /dev/null @@ -1,127 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: Ubuntu blockchain Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: Ubuntu blockchain Test - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 60 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - os: [ubuntu-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_blockchain - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Cache npm - uses: actions/cache@v3 - 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@v3 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - - - name: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - sh install.sh -d - -# Omitted installing Timelord - - - name: Test blockchain code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/blockchain/test_blockchain.py tests/blockchain/test_blockchain_transactions.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error - -# Omitted resource usage check - -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-ubuntu-clvm.yml b/.github/workflows/build-test-ubuntu-clvm.yml deleted file mode 100644 index 486fc78f7a7f..000000000000 --- a/.github/workflows/build-test-ubuntu-clvm.yml +++ /dev/null @@ -1,106 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: Ubuntu clvm Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: Ubuntu clvm Test - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - os: [ubuntu-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_clvm - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Cache npm - uses: actions/cache@v3 - 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@v3 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - -# Omitted checking out blocks and plots repo Chia-Network/test-cache - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - sh install.sh -d - -# Omitted installing Timelord - - - name: Test clvm code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/clvm/test_chialisp_deserialization.py tests/clvm/test_clvm_compilation.py tests/clvm/test_clvm_step.py tests/clvm/test_program.py tests/clvm/test_puzzle_compression.py tests/clvm/test_puzzle_drivers.py tests/clvm/test_puzzles.py tests/clvm/test_serialized_program.py tests/clvm/test_singletons.py tests/clvm/test_spend_sim.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error - -# Omitted resource usage check - -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-ubuntu-core-cmds.yml b/.github/workflows/build-test-ubuntu-core-cmds.yml deleted file mode 100644 index c3f6c13368bd..000000000000 --- a/.github/workflows/build-test-ubuntu-core-cmds.yml +++ /dev/null @@ -1,106 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: Ubuntu core-cmds Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: Ubuntu core-cmds Test - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - os: [ubuntu-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-cmds - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Cache npm - uses: actions/cache@v3 - 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@v3 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - -# Omitted checking out blocks and plots repo Chia-Network/test-cache - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - sh install.sh -d - -# Omitted installing Timelord - - - name: Test core-cmds code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/core/cmds/test_keys.py tests/core/cmds/test_wallet.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error - -# Omitted resource usage check - -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-ubuntu-core-consensus.yml b/.github/workflows/build-test-ubuntu-core-consensus.yml deleted file mode 100644 index 3eeb13ccdc51..000000000000 --- a/.github/workflows/build-test-ubuntu-core-consensus.yml +++ /dev/null @@ -1,106 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: Ubuntu core-consensus Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: Ubuntu core-consensus Test - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - os: [ubuntu-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-consensus - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Cache npm - uses: actions/cache@v3 - 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@v3 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - -# Omitted checking out blocks and plots repo Chia-Network/test-cache - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - sh install.sh -d - -# Omitted installing Timelord - - - name: Test core-consensus code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/core/consensus/test_pot_iterations.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error - -# Omitted resource usage check - -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-ubuntu-core-custom_types.yml b/.github/workflows/build-test-ubuntu-core-custom_types.yml deleted file mode 100644 index 25ee1e4eaf97..000000000000 --- a/.github/workflows/build-test-ubuntu-core-custom_types.yml +++ /dev/null @@ -1,106 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: Ubuntu core-custom_types Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: Ubuntu core-custom_types Test - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - os: [ubuntu-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-custom_types - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Cache npm - uses: actions/cache@v3 - 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@v3 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - -# Omitted checking out blocks and plots repo Chia-Network/test-cache - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - sh install.sh -d - -# Omitted installing Timelord - - - name: Test core-custom_types code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/core/custom_types/test_coin.py tests/core/custom_types/test_proof_of_space.py tests/core/custom_types/test_spend_bundle.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error - -# Omitted resource usage check - -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-ubuntu-core-daemon.yml b/.github/workflows/build-test-ubuntu-core-daemon.yml deleted file mode 100644 index 5622829ca801..000000000000 --- a/.github/workflows/build-test-ubuntu-core-daemon.yml +++ /dev/null @@ -1,131 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: Ubuntu core-daemon Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: Ubuntu core-daemon Test - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - os: [ubuntu-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-daemon - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Cache npm - uses: actions/cache@v3 - 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@v3 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - - - name: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - sh install.sh -d - - - name: Install timelord - run: | - . ./activate - sh install-timelord.sh -n - ./vdf_bench square_asm 400000 - - - name: Test core-daemon code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 0 -m "not benchmark" tests/core/daemon/test_daemon.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error - -# Omitted resource usage check - -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-ubuntu-core-full_node-full_sync.yml b/.github/workflows/build-test-ubuntu-core-full_node-full_sync.yml deleted file mode 100644 index fb819785dda8..000000000000 --- a/.github/workflows/build-test-ubuntu-core-full_node-full_sync.yml +++ /dev/null @@ -1,127 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: Ubuntu core-full_node-full_sync Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: Ubuntu core-full_node-full_sync Test - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 60 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - os: [ubuntu-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-full_node-full_sync - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Cache npm - uses: actions/cache@v3 - 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@v3 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - - - name: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - sh install.sh -d - -# Omitted installing Timelord - - - name: Test core-full_node-full_sync code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" tests/core/full_node/full_sync/test_full_sync.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error - -# Omitted resource usage check - -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/.github/workflows/build-test-ubuntu-core-full_node-stores.yml b/.github/workflows/build-test-ubuntu-core-full_node-stores.yml deleted file mode 100644 index faff4bffec71..000000000000 --- a/.github/workflows/build-test-ubuntu-core-full_node-stores.yml +++ /dev/null @@ -1,130 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: Ubuntu core-full_node-stores Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: Ubuntu core-full_node-stores Test - if: true - runs-on: ${{ matrix.os }} - timeout-minutes: 40 - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - os: [ubuntu-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-full_node-stores - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Cache npm - uses: actions/cache@v3 - 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@v3 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - - - name: Cache test blocks and plots - uses: actions/cache@v2 - id: test-blocks-plots - with: - path: | - ${{ github.workspace }}/.chia/blocks - ${{ github.workspace }}/.chia/test-plots - key: 0.29.0 - - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) - run: | - wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') - run: | - Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . - mkdir ${{ github.workspace }}/.chia - mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - sh install.sh -d - -# Omitted installing Timelord - - - name: Test core-full_node-stores code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 4 -m "not benchmark" -p monitor tests/core/full_node/stores/test_block_store.py tests/core/full_node/stores/test_coin_store.py tests/core/full_node/stores/test_full_node_store.py tests/core/full_node/stores/test_hint_store.py tests/core/full_node/stores/test_sync_store.py - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error - - - name: Check resource usage - run: | - sqlite3 -readonly -separator " " .pymon "select item,cpu_usage,total_time,mem_usage from TEST_METRICS order by mem_usage desc;" >metrics.out - ./tests/check_pytest_monitor_output.py metrics.out - ./tests/check_pytest_monitor_output.py > $GITHUB_PATH + echo "VIRTUAL_ENV=$(cd venv/; pwd)" >> $GITHUB_ENV + + - name: Run install script (Windows) + if: matrix.os.matrix == 'windows' + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python.install_sh }} + run: | + ./Install.ps1 -d + (Resolve-Path venv/Scripts/).Path >> %GITHUB_PATH% + $env_path = (Resolve-Path venv/).Path + Write-Output "VIRTUAL_ENV=$env_path" >> %GITHUB_ENV% + + - name: Install timelord + if: matrix.configuration.install_timelord + run: | + sh install-timelord.sh -n + ./vdf_bench square_asm 400000 + + - name: Test blockchain code with pytest + env: + ENABLE_PYTEST_MONITOR: ${{ matrix.os.matrix == 'ubuntu' && matrix.configuration.check_resource_usage || '' }} + run: | + coverage run --rcfile=.coveragerc --module pytest --durations=10 ${{ matrix.configuration.pytest_parallel_args[matrix.os.matrix] }} -m "not benchmark" ${{ env.ENABLE_PYTEST_MONITOR }} ${{ matrix.configuration.test_files }} + + - name: Process coverage data + run: | + coverage combine --rcfile=.coveragerc .coverage.* + coverage xml --rcfile=.coveragerc -o coverage.xml + mkdir coverage_reports + cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" + cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" + coverage report --rcfile=.coveragerc --show-missing + + - name: Publish coverage + uses: actions/upload-artifact@v3 + with: + name: coverage + path: coverage_reports/* + if-no-files-found: error + + - name: Check resource usage + if: matrix.os.matrix == 'ubuntu' && matrix.configuration.check_resource_usage + run: | + sqlite3 -readonly -separator " " .pymon "select item,cpu_usage,total_time,mem_usage from TEST_METRICS order by mem_usage desc;" >metrics.out + ./tests/check_pytest_monitor_output.py matrix.json + cat matrix.json + echo ::set-output name=configuration::$(cat matrix.json) + echo ::set-output name=steps::$(cat some.json) + + outputs: + configuration: ${{ steps.configure.outputs.configuration }} + + macos: + uses: ./.github/workflows/test-single.yml + needs: configure + with: + emoji: 🍎 + matrix: macos + name: macOS + file_name: macos + concurrency_name: macos + configuration: ${{ needs.configure.outputs.configuration }} + runs-on: macos-latest + ubuntu: + uses: ./.github/workflows/test-single.yml + needs: configure + with: + emoji: 🐧 + matrix: ubuntu + name: Ubuntu + file_name: ubuntu + concurrency_name: ubuntu + configuration: ${{ needs.configure.outputs.configuration }} + runs-on: ubuntu-latest + windows: + uses: ./.github/workflows/test-single.yml + needs: configure + with: + emoji: 🪟 + matrix: windows + name: Windows + file_name: windows + concurrency_name: windows + configuration: ${{ needs.configure.outputs.configuration }} + runs-on: windows-latest + + coverage: + name: Coverage - ${{ matrix.os.name }} ${{ matrix.python.name }} + runs-on: ${{ matrix.os.runs-on }} + needs: + - macos + - ubuntu + - windows + strategy: + fail-fast: false + matrix: + os: + - emoji: 🐧 + matrix: ubuntu + name: Ubuntu + runs-on: ubuntu-latest + python: + - name: '3.8' + action: '3.8' + apt: '3.8' + install_sh: '3.8' + matrix: '3.8' + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Download Coverage + uses: actions/download-artifact@v3 + with: + name: coverage + path: coverage_reports + + - name: Set up ${{ matrix.python.name }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python.action }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + pip install coverage diff-cover + + - name: Coverage Processing + if: always() + run: | + coverage combine coverage_reports/ + coverage xml -o coverage.xml + mkdir all_coverage_report + cp .coverage "all_coverage_report/.coverage.all" + cp coverage.xml "all_coverage_report/coverage.all.xml" + + - name: Coverage report + run: | + coverage report --rcfile=.coveragerc --fail-under=35 --ignore-errors --show-missing + diff-cover --compare-branch=${{ fromJSON(format('[{0}, {1}]', toJSON(github.event.before), toJSON(format('origin/{0}', github.base_ref))))[github.base_ref != ''] }} coverage.xml + + - name: Upload Coverage + if: always() + uses: actions/upload-artifact@v3 + with: + name: coverage + path: all_coverage_report/* + if-no-files-found: error diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 57724f0e7f4d..df4a36e981e2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,6 @@ repos: - repo: local hooks: - - id: build-workflows - name: Validate github action workflows - entry: ./tests/build-workflows.py --fail-on-update - language: python - pass_filenames: false - additional_dependencies: [typing-extensions] - id: check-sql name: Validate SQL statements entry: ./tests/check_sql_statements.py diff --git a/tests/build-job-matrix.py b/tests/build-job-matrix.py new file mode 100644 index 000000000000..a115a8c7c9bc --- /dev/null +++ b/tests/build-job-matrix.py @@ -0,0 +1,129 @@ +import argparse +import json +import logging +import types +from pathlib import Path +from typing import Any, Dict, List + +import testconfig + +root_path = Path(__file__).parent.resolve() +project_root_path = root_path.parent + + +def skip(path: Path) -> bool: + return any(part.startswith(("_", ".")) for part in path.parts) + + +def subdirs(per: str) -> List[Path]: + dirs: List[Path] + + if per == "directory": + glob_pattern = "**/" + elif per == "file": + glob_pattern = "**/test_*.py" + else: + raise Exception(f"Unrecognized per: {per!r}") + + paths = [path for path in root_path.rglob(glob_pattern) if not skip(path=path)] + + if per == "directory": + filtered_paths = [] + for path in paths: + relative_path = path.relative_to(root_path) + logging.info(f"Considering: {relative_path}") + if len([f for f in path.glob("test_*.py")]) == 0: + logging.info(f"Skipping {relative_path}: no tests collected") + continue + + filtered_paths.append(path) + + paths = filtered_paths + + return sorted(paths) + + +def module_dict(module: types.ModuleType) -> Dict[str, Any]: + return {k: v for k, v in module.__dict__.items() if not k.startswith("_")} + + +def dir_config(dir: Path) -> Dict[str, Any]: + import importlib + + module_name = ".".join([*dir.relative_to(root_path).parts, "config"]) + try: + return module_dict(importlib.import_module(module_name)) + except ModuleNotFoundError: + return {} + + +# Overwrite with directory specific values +def update_config(parent: Dict[str, Any], child: Dict[str, Any]) -> Dict[str, Any]: + if child is None: + return parent + conf = child + for k, v in parent.items(): + if k not in child: + conf[k] = v + return conf + + +# args +arg_parser = argparse.ArgumentParser(description="Generate GitHub test matrix configuration") +arg_parser.add_argument("--per", type=str, choices=["directory", "file"], required=True) +arg_parser.add_argument("--verbose", "-v", action="store_true") +args = arg_parser.parse_args() + +if args.verbose: + logging.basicConfig(format="%(asctime)s:%(message)s", level=logging.DEBUG) + +# main +test_paths = subdirs(per=args.per) + +configuration = [] + +for path in test_paths: + if path.is_dir(): + test_files = sorted(path.glob("test_*.py")) + test_file_paths = [file.relative_to(project_root_path) for file in test_files] + paths_for_cli = " ".join(path.as_posix() for path in test_file_paths) + else: + paths_for_cli = path.relative_to(project_root_path).as_posix() + + conf = update_config(module_dict(testconfig), dir_config(path)) + + # TODO: design a configurable system for this + process_count = { + "macos": {False: 0, True: 4}.get(conf["parallel"], conf["parallel"]), + "ubuntu": {False: 0, True: 4}.get(conf["parallel"], conf["parallel"]), + "windows": {False: 0, True: 2}.get(conf["parallel"], conf["parallel"]), + } + pytest_parallel_args = {os: f" -n {count}" for os, count in process_count.items()} + + run = { + "macos": "macos" not in conf["os_skip"], + "ubuntu": "ubuntu" not in conf["os_skip"], + "windows": "windows" not in conf["os_skip"] and not conf["install_timelord"], + } + + for_matrix = { + "check_resource_usage": conf["check_resource_usage"], + "enable_pytest_monitor": "-p monitor" if conf["check_resource_usage"] else "", + "job_timeout": conf["job_timeout"], + "pytest_parallel_args": pytest_parallel_args, + "checkout_blocks_and_plots": conf["checkout_blocks_and_plots"], + "install_timelord": conf["install_timelord"], + "test_files": paths_for_cli, + "name": ".".join(path.relative_to(root_path).with_suffix("").parts), + "run": run, + } + for_matrix = dict(sorted(for_matrix.items())) + configuration.append(for_matrix) + + +configuration_json = json.dumps(configuration) + +for line in json.dumps(configuration, indent=4).splitlines(): + logging.info(line) + +print(f"{configuration_json}") diff --git a/tests/build-workflows.py b/tests/build-workflows.py deleted file mode 100755 index ed261877f897..000000000000 --- a/tests/build-workflows.py +++ /dev/null @@ -1,173 +0,0 @@ -#!/usr/bin/env python3 - -# Run from the current directory. - -import argparse -import sys - -import testconfig -import logging -from pathlib import Path -from typing import Dict, List - -root_path = Path(__file__).parent.resolve() - - -def subdirs() -> List[Path]: - dirs: List[Path] = [] - for r in root_path.iterdir(): - if r.is_dir(): - dirs.extend(Path(r).rglob("**/")) - return [d for d in dirs if not (any(c.startswith("_") for c in d.parts) or any(c.startswith(".") for c in d.parts))] - - -def module_dict(module): - return {k: v for k, v in module.__dict__.items() if not k.startswith("_")} - - -def dir_config(dir): - import importlib - - module_name = ".".join([*dir.relative_to(root_path).parts, "config"]) - try: - return module_dict(importlib.import_module(module_name)) - except ModuleNotFoundError: - return {} - - -def read_file(filename: Path) -> str: - return filename.read_bytes().decode("utf8") - - -# Input file -def workflow_yaml_template_text(os): - return read_file(Path(root_path / f"runner_templates/build-test-{os}")) - - -# Output files -def workflow_yaml_file(dir, os, test_name): - return Path(dir / f"build-test-{os}-{test_name}.yml") - - -# String function from test dir to test name -def test_name(dir): - return "-".join(dir.relative_to(root_path).parts) - - -def transform_template(template_text, replacements): - t = template_text - for r, v in replacements.items(): - t = t.replace(r, v) - return t - - -# Replace with update_config -def generate_replacements(conf, dir): - replacements = { - "INSTALL_TIMELORD": read_file(Path(root_path / "runner_templates/install-timelord.include.yml")).rstrip(), - "CHECKOUT_TEST_BLOCKS_AND_PLOTS": read_file( - Path(root_path / "runner_templates/checkout-test-plots.include.yml") - ).rstrip(), - "CHECK_RESOURCE_USAGE": read_file( - Path(root_path / "runner_templates/check-resource-usage.include.yml") - ).rstrip(), - "ENABLE_PYTEST_MONITOR": "", - "TEST_FILES": "", - "TEST_NAME": "", - "PYTEST_PARALLEL_ARGS": "", - "RUN": "true", - } - - # TODO: design a configurable system for this - if os == "windows": - xdist_numprocesses = {False: 0, True: 2}.get(conf["parallel"], conf["parallel"]) - else: - xdist_numprocesses = {False: 0, True: 4}.get(conf["parallel"], conf["parallel"]) - - replacements["PYTEST_PARALLEL_ARGS"] = f" -n {xdist_numprocesses}" - - if not conf["checkout_blocks_and_plots"]: - replacements[ - "CHECKOUT_TEST_BLOCKS_AND_PLOTS" - ] = "# Omitted checking out blocks and plots repo Chia-Network/test-cache" - if not conf["install_timelord"]: - replacements["INSTALL_TIMELORD"] = "# Omitted installing Timelord" - if conf["job_timeout"]: - replacements["JOB_TIMEOUT"] = str(conf["job_timeout"]) - test_files = sorted(dir.glob("test_*.py")) - test_file_paths = [file.relative_to(root_path.parent).as_posix() for file in test_files] - replacements["TEST_FILES"] = " ".join(test_file_paths) - replacements["TEST_NAME"] = test_name(dir) - if "test_name" in conf: - replacements["TEST_NAME"] = conf["test_name"] - if conf["check_resource_usage"]: - replacements["ENABLE_PYTEST_MONITOR"] = "-p monitor" - else: - replacements["CHECK_RESOURCE_USAGE"] = "# Omitted resource usage check" - for var in conf["custom_vars"]: - replacements[var] = conf[var] if var in conf else "" - if os in conf["os_skip"] or (conf["install_timelord"] and os == "windows"): - # TODO: enable timelord for windows, and stop skipping - replacements["RUN"] = "false" - return replacements - - -# Overwrite with directory specific values -def update_config(parent, child): - if child is None: - return parent - conf = child - for k, v in parent.items(): - if k not in child: - conf[k] = v - return conf - - -def dir_path(string): - p = Path(root_path / string) - if p.is_dir(): - return p - else: - raise NotADirectoryError(string) - - -# args -arg_parser = argparse.ArgumentParser(description="Build github workflows") -arg_parser.add_argument("--output-dir", "-d", default="../.github/workflows", type=dir_path) -arg_parser.add_argument("--fail-on-update", "-f", action="store_true") -arg_parser.add_argument("--verbose", "-v", action="store_true") -args = arg_parser.parse_args() - -if args.verbose: - logging.basicConfig(format="%(asctime)s:%(message)s", level=logging.DEBUG) - -# main -test_dirs = subdirs() -current_workflows: Dict[Path, str] = { - file: read_file(file) for file in args.output_dir.iterdir() if str(file).endswith(".yml") -} -changed: bool = False - -for os in testconfig.oses: - template_text = workflow_yaml_template_text(os) - for dir in test_dirs: - if len([f for f in Path(root_path / dir).glob("test_*.py")]) == 0: - logging.info(f"Skipping {dir}: no tests collected") - continue - conf = update_config(module_dict(testconfig), dir_config(dir)) - replacements = generate_replacements(conf, dir) - txt = transform_template(template_text, replacements) - # remove trailing whitespace from lines and assure a single EOF at EOL - txt = "\n".join(line.rstrip() for line in txt.rstrip().splitlines()) + "\n" - logging.info(f"Writing {os}-{test_name(dir)}") - workflow_yaml_path: Path = workflow_yaml_file(args.output_dir, os, test_name(dir)) - if workflow_yaml_path not in current_workflows or current_workflows[workflow_yaml_path] != txt: - changed = True - workflow_yaml_path.write_bytes(txt.encode("utf8")) - -if changed: - print("New workflow updates available.") - if args.fail_on_update: - sys.exit(1) -else: - print("Nothing to do.") diff --git a/tests/runner_templates/__init__.py b/tests/runner_templates/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/runner_templates/build-test-macos b/tests/runner_templates/build-test-macos deleted file mode 100644 index e43fb310cfad..000000000000 --- a/tests/runner_templates/build-test-macos +++ /dev/null @@ -1,104 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: MacOS TEST_NAME Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: MacOS TEST_NAME Tests - if: RUN - runs-on: ${{ matrix.os }} - timeout-minutes: JOB_TIMEOUT - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - os: [macOS-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_TEST_NAME - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Create keychain for CI use - run: | - security create-keychain -p foo chiachain - security default-keychain -s chiachain - security unlock-keychain -p foo chiachain - security set-keychain-settings -t 7200 -u chiachain - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip - uses: actions/cache@v3 - 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- - -CHECKOUT_TEST_BLOCKS_AND_PLOTS - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - brew install boost - sh install.sh -d - -INSTALL_TIMELORD - - - name: Test TEST_NAME code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 PYTEST_PARALLEL_ARGS -m "not benchmark" TEST_FILES - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/tests/runner_templates/build-test-ubuntu b/tests/runner_templates/build-test-ubuntu deleted file mode 100644 index ca93263c0eea..000000000000 --- a/tests/runner_templates/build-test-ubuntu +++ /dev/null @@ -1,106 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: Ubuntu TEST_NAME Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: Ubuntu TEST_NAME Test - if: RUN - runs-on: ${{ matrix.os }} - timeout-minutes: JOB_TIMEOUT - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - os: [ubuntu-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_TEST_NAME - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Cache npm - uses: actions/cache@v3 - 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@v3 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - -CHECKOUT_TEST_BLOCKS_AND_PLOTS - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - sh install.sh -d - -INSTALL_TIMELORD - - - name: Test TEST_NAME code with pytest - run: | - . ./activate - venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 PYTEST_PARALLEL_ARGS -m "not benchmark" ENABLE_PYTEST_MONITOR TEST_FILES - - - name: Process coverage data - run: | - venv/bin/coverage combine --rcfile=.coveragerc .coverage.* - venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/bin/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error - -CHECK_RESOURCE_USAGE - -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/tests/runner_templates/build-test-windows b/tests/runner_templates/build-test-windows deleted file mode 100644 index 6cfb6eb3a5b7..000000000000 --- a/tests/runner_templates/build-test-windows +++ /dev/null @@ -1,108 +0,0 @@ -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# -name: Windows TEST_NAME Test - -on: - push: - branches: - - 'long_lived/**' - - main - - 'release/**' - tags: - - '**' - pull_request: - branches: - - '**' - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }} - cancel-in-progress: true - -jobs: - build: - name: Windows TEST_NAME Test - if: RUN - runs-on: ${{ matrix.os }} - timeout-minutes: JOB_TIMEOUT - strategy: - fail-fast: false - max-parallel: 4 - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - os: [windows-latest] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_TEST_NAME - - steps: - - name: Configure git - run: | - git config --global core.autocrlf false - - - name: Checkout Code - uses: actions/checkout@v3 - 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@v3 - 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@v3 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - -CHECKOUT_TEST_BLOCKS_AND_PLOTS - - - name: Run install script - env: - INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} - run: | - ./Install.ps1 -d - -INSTALL_TIMELORD - - - name: Test TEST_NAME code with pytest - run: | - ./venv/Scripts/activate.ps1 - venv/Scripts/coverage run --rcfile=.coveragerc --module pytest --durations=10 PYTEST_PARALLEL_ARGS -m "not benchmark" TEST_FILES - - - name: Process coverage data - run: | - venv/Scripts/coverage combine --rcfile=.coveragerc - venv/Scripts/coverage xml --rcfile=.coveragerc -o coverage.xml - mkdir coverage_reports - cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" - cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" - venv/Scripts/coverage report --rcfile=.coveragerc --show-missing - - - name: Publish coverage - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage_reports/* - if-no-files-found: error - -# -# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme -# diff --git a/tests/runner_templates/check-resource-usage.include.yml b/tests/runner_templates/check-resource-usage.include.yml deleted file mode 100644 index ee33af3aa534..000000000000 --- a/tests/runner_templates/check-resource-usage.include.yml +++ /dev/null @@ -1,4 +0,0 @@ - - name: Check resource usage - run: | - sqlite3 -readonly -separator " " .pymon "select item,cpu_usage,total_time,mem_usage from TEST_METRICS order by mem_usage desc;" >metrics.out - ./tests/check_pytest_monitor_output.py Date: Tue, 31 May 2022 20:18:21 -0400 Subject: [PATCH 02/21] avoid needing typing-extensions to build workflow jobs --- tests/testconfig.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/testconfig.py b/tests/testconfig.py index 5375b595e8f7..d9cd46d461a3 100644 --- a/tests/testconfig.py +++ b/tests/testconfig.py @@ -1,10 +1,11 @@ from __future__ import annotations -from typing import List, Union +from typing import TYPE_CHECKING, List, Union -from typing_extensions import Literal +if TYPE_CHECKING: + from typing_extensions import Literal -Oses = Literal["macos", "ubuntu", "windows"] + Oses = Literal["macos", "ubuntu", "windows"] # Defaults are conservative. parallel: Union[bool, int, Literal["auto"]] = False From 35e697e6139be1e2958065a3a28a7b98f90f5edc Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 31 May 2022 20:24:38 -0400 Subject: [PATCH 03/21] remove incorrect coverage job --- .github/workflows/test-single.yml | 63 ------------------------------- .github/workflows/test.yml | 4 +- 2 files changed, 2 insertions(+), 65 deletions(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index 743baf01cfc2..e66e2b3d369c 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -207,66 +207,3 @@ jobs: run: | sqlite3 -readonly -separator " " .pymon "select item,cpu_usage,total_time,mem_usage from TEST_METRICS order by mem_usage desc;" >metrics.out ./tests/check_pytest_monitor_output.py Date: Tue, 31 May 2022 20:46:47 -0400 Subject: [PATCH 04/21] correct enabling of pytest-monitor --- .github/workflows/test-single.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index e66e2b3d369c..7ef2a17d99ed 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -182,7 +182,7 @@ jobs: - name: Test blockchain code with pytest env: - ENABLE_PYTEST_MONITOR: ${{ matrix.os.matrix == 'ubuntu' && matrix.configuration.check_resource_usage || '' }} + ENABLE_PYTEST_MONITOR: ${{ matrix.os.matrix == 'ubuntu' && matrix.configuration.enable_pytest_monitor || '' }} run: | coverage run --rcfile=.coveragerc --module pytest --durations=10 ${{ matrix.configuration.pytest_parallel_args[matrix.os.matrix] }} -m "not benchmark" ${{ env.ENABLE_PYTEST_MONITOR }} ${{ matrix.configuration.test_files }} From 77e788bde5e26ac97b7f79a653960b17b24321a3 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 31 May 2022 20:57:55 -0400 Subject: [PATCH 05/21] $Env:GITHUB_* --- .github/workflows/test-single.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index 7ef2a17d99ed..a6f12c9fe931 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -170,9 +170,9 @@ jobs: INSTALL_PYTHON_VERSION: ${{ matrix.python.install_sh }} run: | ./Install.ps1 -d - (Resolve-Path venv/Scripts/).Path >> %GITHUB_PATH% + (Resolve-Path venv/Scripts/).Path >> $Env:GITHUB_PATH $env_path = (Resolve-Path venv/).Path - Write-Output "VIRTUAL_ENV=$env_path" >> %GITHUB_ENV% + Write-Output "VIRTUAL_ENV=$env_path" >> $Env:GITHUB_ENV - name: Install timelord if: matrix.configuration.install_timelord From a4c69cd7eddbbc564a4cc3dc05655ec1e49756f3 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 31 May 2022 21:05:27 -0400 Subject: [PATCH 06/21] tweak concurrency --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2e7516626201..491af1629ae9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ on: workflow_dispatch: null concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }} + group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}--${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} cancel-in-progress: true jobs: From de5720bcba352a9ea8bf7d78ba8df6de56e4f0ee Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 31 May 2022 21:09:40 -0400 Subject: [PATCH 07/21] add explanation for use of the reusable workflow --- .github/workflows/test-single.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index a6f12c9fe931..9cc8933ea699 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -1,5 +1,10 @@ name: test +# This reusable workflow structure was chosen for the sole purpose of working around +# the 256 job per matrix limit. The initial total test job count was 290. This +# approach shifts the 256 limit to be per OS rather than overall. A simpler single +# regular workflow with matrixing against the OS would be preferred. + on: workflow_call: inputs: From 2fdd2a9a714fe2497d40d0ef3bac21b1708b8c12 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 31 May 2022 21:14:50 -0400 Subject: [PATCH 08/21] name: Generate matrix configuration --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 491af1629ae9..2b0c93145dfd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,7 @@ jobs: with: python-version: '3.9' - - name: Find test paths + - name: Generate matrix configuration id: configure run: | python tests/build-job-matrix.py --per directory --verbose > matrix.json From b3fcc9edf920790d151d1ab621e67708c5fb3389 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 31 May 2022 21:16:54 -0400 Subject: [PATCH 09/21] correct timelord installation choice logic --- .github/workflows/test-single.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index 9cc8933ea699..251cb7bda07f 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -180,7 +180,7 @@ jobs: Write-Output "VIRTUAL_ENV=$env_path" >> $Env:GITHUB_ENV - name: Install timelord - if: matrix.configuration.install_timelord + if: matrix.configuration.install_timelord[matrix.os.matrix] run: | sh install-timelord.sh -n ./vdf_bench square_asm 400000 From b40f451624b532cf2473dc17cea5c02587b27738 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 31 May 2022 21:28:02 -0400 Subject: [PATCH 10/21] avoid * to fix coverage combining on windows --- .github/workflows/test-single.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index 251cb7bda07f..facd9de3a73b 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -193,7 +193,7 @@ jobs: - name: Process coverage data run: | - coverage combine --rcfile=.coveragerc .coverage.* + coverage combine --rcfile=.coveragerc coverage xml --rcfile=.coveragerc -o coverage.xml mkdir coverage_reports cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" From 2831404cfd2d92e557c00eccaa63971ef0a0a2a2 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 31 May 2022 21:30:58 -0400 Subject: [PATCH 11/21] name: Configure matrix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2b0c93145dfd..dd1876ecac8d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ concurrency: jobs: configure: - name: Configure test matrix + name: Configure matrix runs-on: ubuntu-latest steps: From c9d336726ee6f7f3d89055db37f9c1e5d6b9e3a5 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 31 May 2022 21:54:47 -0400 Subject: [PATCH 12/21] bring back the conditional run --- .github/workflows/test-single.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index facd9de3a73b..17db92115458 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -39,6 +39,7 @@ concurrency: jobs: test: name: ${{ matrix.os.emoji }} ${{ matrix.configuration.name }} - ${{ matrix.python.name }} + if: ${{ matrix.configuration.run[matrix.os.matrix] }} runs-on: ${{ matrix.os.runs-on }} timeout-minutes: ${{ matrix.configuration.job_timeout }} strategy: From 5c195ff8dd9dd30dab242d47e688f92ee5ae8030 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 31 May 2022 22:01:23 -0400 Subject: [PATCH 13/21] less matrix.os.matrix --- .github/workflows/test-single.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index 17db92115458..6c016a189523 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -181,7 +181,7 @@ jobs: Write-Output "VIRTUAL_ENV=$env_path" >> $Env:GITHUB_ENV - name: Install timelord - if: matrix.configuration.install_timelord[matrix.os.matrix] + if: matrix.configuration.install_timelord run: | sh install-timelord.sh -n ./vdf_bench square_asm 400000 From 2b49a76b14c1fc6b6fb47b933b77856681b8021d Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 31 May 2022 22:22:38 -0400 Subject: [PATCH 14/21] hmm --- .github/workflows/test-single.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index 6c016a189523..51df763ba87c 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -39,7 +39,7 @@ concurrency: jobs: test: name: ${{ matrix.os.emoji }} ${{ matrix.configuration.name }} - ${{ matrix.python.name }} - if: ${{ matrix.configuration.run[matrix.os.matrix] }} + if: matrix.configuration.run[matrix.os.matrix] runs-on: ${{ matrix.os.runs-on }} timeout-minutes: ${{ matrix.configuration.job_timeout }} strategy: From f057f59f3a5054a07e5738849c8f66fe1f03d05e Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 31 May 2022 22:34:54 -0400 Subject: [PATCH 15/21] again --- .github/workflows/test-single.yml | 5 ++++- .github/workflows/test.yml | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index 51df763ba87c..95ae70e9df01 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -29,6 +29,9 @@ on: runs-on: required: true type: string + runs: + required: true + type: boolean concurrency: @@ -39,7 +42,7 @@ concurrency: jobs: test: name: ${{ matrix.os.emoji }} ${{ matrix.configuration.name }} - ${{ matrix.python.name }} - if: matrix.configuration.run[matrix.os.matrix] + if: inputs.run runs-on: ${{ matrix.os.runs-on }} timeout-minutes: ${{ matrix.configuration.job_timeout }} strategy: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dd1876ecac8d..f83f029d2b47 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,6 +53,7 @@ jobs: concurrency_name: macos configuration: ${{ needs.configure.outputs.configuration }} runs-on: macos-latest + run: ${{ needs.configure.outputs.configuration.run["macos"] ubuntu: uses: ./.github/workflows/test-single.yml needs: configure @@ -64,6 +65,7 @@ jobs: concurrency_name: ubuntu configuration: ${{ needs.configure.outputs.configuration }} runs-on: ubuntu-latest + run: ${{ needs.configure.outputs.configuration.run["ubuntu"] windows: uses: ./.github/workflows/test-single.yml needs: configure @@ -75,6 +77,7 @@ jobs: concurrency_name: windows configuration: ${{ needs.configure.outputs.configuration }} runs-on: windows-latest + run: ${{ needs.configure.outputs.configuration.run["windows"] coverage: name: Coverage - ${{ matrix.os.name }} ${{ matrix.python.name }} From 6c9ed815bf28a4d49b606af2b8fb589066df950f Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 31 May 2022 23:09:45 -0400 Subject: [PATCH 16/21] exclude instead --- .github/workflows/test-single.yml | 12 ++++++++---- .github/workflows/test.yml | 3 --- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index 95ae70e9df01..0a64c9425446 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -29,9 +29,6 @@ on: runs-on: required: true type: string - runs: - required: true - type: boolean concurrency: @@ -42,7 +39,6 @@ concurrency: jobs: test: name: ${{ matrix.os.emoji }} ${{ matrix.configuration.name }} - ${{ matrix.python.name }} - if: inputs.run runs-on: ${{ matrix.os.runs-on }} timeout-minutes: ${{ matrix.configuration.job_timeout }} strategy: @@ -84,6 +80,14 @@ jobs: matrix: macos python: matrix: '3.8' + - os: + matrix: windows + configuration: + install_timelord: true + - os: + matrix: windows + configuration: + name: core.full_node env: CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f83f029d2b47..dd1876ecac8d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,7 +53,6 @@ jobs: concurrency_name: macos configuration: ${{ needs.configure.outputs.configuration }} runs-on: macos-latest - run: ${{ needs.configure.outputs.configuration.run["macos"] ubuntu: uses: ./.github/workflows/test-single.yml needs: configure @@ -65,7 +64,6 @@ jobs: concurrency_name: ubuntu configuration: ${{ needs.configure.outputs.configuration }} runs-on: ubuntu-latest - run: ${{ needs.configure.outputs.configuration.run["ubuntu"] windows: uses: ./.github/workflows/test-single.yml needs: configure @@ -77,7 +75,6 @@ jobs: concurrency_name: windows configuration: ${{ needs.configure.outputs.configuration }} runs-on: windows-latest - run: ${{ needs.configure.outputs.configuration.run["windows"] coverage: name: Coverage - ${{ matrix.os.name }} ${{ matrix.python.name }} From adca4f1526c9d1b29dbe68948e57b307ee5f62bd Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 31 May 2022 23:49:02 -0400 Subject: [PATCH 17/21] fixup JOB_FILE_NAME --- .github/workflows/test-single.yml | 7 ++++++- .github/workflows/test.yml | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index 0a64c9425446..83f48680ed33 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -49,24 +49,29 @@ jobs: - emoji: ${{ inputs.emoji }} matrix: ${{ inputs.matrix }} name: ${{ inputs.name }} + file_name: ${{ inputs.file_name }} runs-on: ${{ inputs.runs-on }} python: - name: '3.7' + file_name: '3.7' action: '3.7' apt: '3.7' install_sh: '3.7' matrix: '3.7' - name: '3.8' + file_name: '3.8' action: '3.8' apt: '3.8' install_sh: '3.8' matrix: '3.8' - name: '3.9' + file_name: '3.9' action: '3.9' apt: '3.9' install_sh: '3.9' matrix: '3.9' - name: '3.10' + file_name: '3.10' action: '3.10' apt: '3.10' install_sh: '3.10' @@ -91,7 +96,7 @@ jobs: env: CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - JOB_FILE_NAME: tests_${{ matrix.os.file_name }}_python-${{ matrix.python-version }}_${{ matrix.configuration.name }} + JOB_FILE_NAME: tests_${{ matrix.os.file_name }}_python-${{ matrix.python.file_name }}_${{ matrix.configuration.name }} steps: - name: Configure git diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dd1876ecac8d..dafc96057ae9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -92,11 +92,11 @@ jobs: name: Ubuntu runs-on: ubuntu-latest python: - - name: '3.8' - action: '3.8' - apt: '3.8' - install_sh: '3.8' - matrix: '3.8' + - name: '3.9' + action: '3.9' + apt: '3.9' + install_sh: '3.9' + matrix: '3.9' steps: - uses: actions/checkout@v3 From d523c09f2d485c444ed635fef20a23d36dff6f5d Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 1 Jun 2022 09:27:39 -0400 Subject: [PATCH 18/21] leave the final coverage step for later --- .github/workflows/test.yml | 65 -------------------------------------- 1 file changed, 65 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dafc96057ae9..f347ac022b20 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -75,68 +75,3 @@ jobs: concurrency_name: windows configuration: ${{ needs.configure.outputs.configuration }} runs-on: windows-latest - - coverage: - name: Coverage - ${{ matrix.os.name }} ${{ matrix.python.name }} - runs-on: ${{ matrix.os.runs-on }} - needs: - - macos - - ubuntu - - windows - strategy: - fail-fast: false - matrix: - os: - - emoji: 🐧 - matrix: ubuntu - name: Ubuntu - runs-on: ubuntu-latest - python: - - name: '3.9' - action: '3.9' - apt: '3.9' - install_sh: '3.9' - matrix: '3.9' - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Download Coverage - uses: actions/download-artifact@v3 - with: - name: coverage - path: coverage_reports - - - name: Set up ${{ matrix.python.name }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python.action }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip setuptools wheel - pip install coverage diff-cover - - - name: Coverage Processing - if: always() - run: | - coverage combine coverage_reports/ - coverage xml -o coverage.xml - mkdir all_coverage_report - cp .coverage "all_coverage_report/.coverage.all" - cp coverage.xml "all_coverage_report/coverage.all.xml" - - - name: Coverage report - run: | - coverage report --rcfile=.coveragerc --fail-under=35 --ignore-errors --show-missing - diff-cover --compare-branch=${{ fromJSON(format('[{0}, {1}]', toJSON(github.event.before), toJSON(format('origin/{0}', github.base_ref))))[github.base_ref != ''] }} coverage.xml - - - name: Upload Coverage - if: always() - uses: actions/upload-artifact@v3 - with: - name: coverage - path: all_coverage_report/* - if-no-files-found: error From f22d457d9a467e2f6ac007838df963fc642d7afc Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 1 Jun 2022 09:41:20 -0400 Subject: [PATCH 19/21] drop configuration.runs in favor of matrix excludes --- tests/build-job-matrix.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tests/build-job-matrix.py b/tests/build-job-matrix.py index a115a8c7c9bc..944c587ff2c6 100644 --- a/tests/build-job-matrix.py +++ b/tests/build-job-matrix.py @@ -100,12 +100,6 @@ def update_config(parent: Dict[str, Any], child: Dict[str, Any]) -> Dict[str, An } pytest_parallel_args = {os: f" -n {count}" for os, count in process_count.items()} - run = { - "macos": "macos" not in conf["os_skip"], - "ubuntu": "ubuntu" not in conf["os_skip"], - "windows": "windows" not in conf["os_skip"] and not conf["install_timelord"], - } - for_matrix = { "check_resource_usage": conf["check_resource_usage"], "enable_pytest_monitor": "-p monitor" if conf["check_resource_usage"] else "", @@ -115,7 +109,6 @@ def update_config(parent: Dict[str, Any], child: Dict[str, Any]) -> Dict[str, An "install_timelord": conf["install_timelord"], "test_files": paths_for_cli, "name": ".".join(path.relative_to(root_path).with_suffix("").parts), - "run": run, } for_matrix = dict(sorted(for_matrix.items())) configuration.append(for_matrix) From 97cd847f7725cb78c8462764ee491ef5d7973a74 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 1 Jun 2022 10:08:39 -0400 Subject: [PATCH 20/21] fixup os checks --- .github/workflows/test-single.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index 83f48680ed33..b609074c6d0c 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -113,7 +113,7 @@ jobs: with: python-version: ${{ matrix.python.action }} - - name: Create keychain for CI use + - name: Create keychain for CI use (macOS) if: matrix.os.matrix == 'macos' run: | security create-keychain -p foo chiachain @@ -121,7 +121,7 @@ jobs: security unlock-keychain -p foo chiachain security set-keychain-settings -t 7200 -u chiachain - - name: Cache npm + - name: Cache npm (Ubuntu) if: matrix.os.matrix == 'ubuntu' uses: actions/cache@v2.1.6 with: @@ -154,15 +154,15 @@ jobs: ${{ github.workspace }}/.chia/test-plots key: 0.29.0 - - name: Checkout test blocks and plots (Linux, macOS) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'macos')) + - name: Checkout test blocks and plots (macOS, Ubuntu) + if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (matrix.os.matrix == 'ubuntu' || matrix.os.matrix == 'macos') run: | wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - mkdir ${{ github.workspace }}/.chia mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia - name: Checkout test blocks and plots (Windows) - if: steps.test-blocks-plots.outputs.cache-hit != 'true' && startswith(matrix.os, 'windows') + if: steps.test-blocks-plots.outputs.cache-hit != 'true' && matrix.os.matrix == 'windows' run: | Invoke-WebRequest -OutFile blocks_and_plots.zip https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.zip; Expand-Archive blocks_and_plots.zip -DestinationPath . mkdir ${{ github.workspace }}/.chia From b50b7e85329e170f87e4a5d4109f68ffca73869e Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 1 Jun 2022 12:06:02 -0400 Subject: [PATCH 21/21] actions/cache@v3 --- .github/workflows/test-single.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index b609074c6d0c..7b85c25b3bf8 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -123,7 +123,7 @@ jobs: - name: Cache npm (Ubuntu) if: matrix.os.matrix == 'ubuntu' - uses: actions/cache@v2.1.6 + uses: actions/cache@v3 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} @@ -136,7 +136,7 @@ jobs: echo "::set-output name=dir::$(pip cache dir)" - name: Cache pip - uses: actions/cache@v2.1.6 + uses: actions/cache@v3 with: # Note that new runners may break this https://github.com/actions/cache/issues/292 path: ${{ steps.pip-cache.outputs.dir }} @@ -146,7 +146,7 @@ jobs: - name: Cache test blocks and plots if: matrix.configuration.checkout_blocks_and_plots - uses: actions/cache@v2 + uses: actions/cache@v3 id: test-blocks-plots with: path: |