feat(pop-cli): add --json support for new, clean, completion, upgrade, and install commands #1388
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: integration tests | |
| permissions: | |
| contents: read | |
| packages: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| - 'LICENSE' | |
| - '.gitignore' | |
| - '.github/**.md' | |
| env: | |
| CARGO_TERM_COLOR: always | |
| GITHUB_ACTOR: pop-cli | |
| CARGO_INCREMENTAL: 1 | |
| RUST_BACKTRACE: 1 | |
| # It is important to always use the same flags. Otherwise, the cache will not work. | |
| RUSTFLAGS: "-Dwarnings" | |
| RUSTDOCFLAGS: "-Dwarnings" | |
| concurrency: | |
| # Cancel any in-progress jobs for the same pull request or branch | |
| group: integration-tests-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| uses: ./.github/workflows/lint.yml | |
| pop-fork-integration-tests: | |
| needs: lint | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Free up space on runner (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: ./.github/actions/free-up-space | |
| - name: Setup Rust toolchain | |
| uses: ./.github/actions/setup-rust-stable-wasm | |
| with: | |
| components: rust-src | |
| - name: Rust Cache Linux | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: true | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| shared-key: pop-cache | |
| - name: Rust Cache MacOS | |
| if: matrix.os == 'macos-latest' | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: true | |
| shared-key: pop-cache | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Install protobuf compiler | |
| uses: ./.github/actions/install-protobuf | |
| with: | |
| runner-os: ${{ runner.os }} | |
| - name: Install cargo-nextest | |
| uses: ./.github/actions/install-nextest | |
| - name: Cache pop binaries | |
| uses: ./.github/actions/cache-pop-binaries | |
| with: | |
| runner-os: ${{ matrix.os }} | |
| runner-arch: ${{ runner.arch }} | |
| cache-key-suffix: ${{ hashFiles('.github/workflows/integration-tests.yml', 'crates/pop-chains/src/up/mod.rs', 'crates/pop-common/src/test_env.rs') }} | |
| - name: Start detached ink-node | |
| uses: ./.github/actions/start-ink-node | |
| with: | |
| runner-os: ${{ matrix.os }} | |
| - name: Run pop-fork integration tests | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| POP_FORK_TEST_NODE_WS_URL: ws://127.0.0.1:9944 | |
| run: | | |
| cargo nextest run \ | |
| --release \ | |
| --locked \ | |
| -p pop-fork \ | |
| --features integration-tests \ | |
| --test fork \ | |
| -j 8 \ | |
| --no-fail-fast \ | |
| --status-level all | |
| - name: Stop detached ink-node | |
| if: always() | |
| uses: ./.github/actions/stop-ink-node | |
| contract-integration-tests: | |
| needs: lint | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Free up space on runner | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: ./.github/actions/free-up-space | |
| - name: Setup Rust toolchain | |
| uses: ./.github/actions/setup-rust-stable-wasm | |
| with: | |
| components: rust-src,clippy | |
| - name: Rust Cache Linux | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: true | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| shared-key: pop-cache | |
| - name: Rust Cache MacOS | |
| if: matrix.os == 'macos-latest' | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: true | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| shared-key: pop-cache | |
| - name: Install protobuf compiler | |
| uses: ./.github/actions/install-protobuf | |
| with: | |
| runner-os: ${{ runner.os }} | |
| - name: Ensure Docker is running (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: ./.github/actions/ensure-docker | |
| - name: Install cargo-nextest | |
| uses: ./.github/actions/install-nextest | |
| - name: Cache pop binaries | |
| uses: ./.github/actions/cache-pop-binaries | |
| with: | |
| runner-os: ${{ matrix.os }} | |
| runner-arch: ${{ runner.arch }} | |
| cache-key-suffix: ${{ hashFiles('.github/workflows/integration-tests.yml', 'crates/pop-chains/src/up/mod.rs', 'crates/pop-common/src/test_env.rs') }} | |
| - name: Run integration tests | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| cargo nextest run \ | |
| --release \ | |
| --locked \ | |
| -p pop-contracts \ | |
| --features integration-tests \ | |
| --test contracts \ | |
| -j 8 \ | |
| --no-fail-fast \ | |
| --nocapture \ | |
| --status-level all | |
| chain-integration-tests: | |
| needs: lint | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Free up space on runner (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: ./.github/actions/free-up-space | |
| - name: Setup Rust toolchain | |
| uses: ./.github/actions/setup-rust-stable-wasm | |
| with: | |
| components: rust-src | |
| - name: Rust Cache Linux | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: true | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| shared-key: pop-cache | |
| - name: Rust Cache MacOS | |
| if: matrix.os == 'macos-latest' | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: true | |
| shared-key: pop-cache | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Install protobuf compiler | |
| uses: ./.github/actions/install-protobuf | |
| with: | |
| runner-os: ${{ runner.os }} | |
| - name: Ensure Docker is running (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: ./.github/actions/ensure-docker | |
| - name: Install cargo-nextest | |
| uses: ./.github/actions/install-nextest | |
| - name: Cache pop binaries | |
| uses: ./.github/actions/cache-pop-binaries | |
| with: | |
| runner-os: ${{ matrix.os }} | |
| runner-arch: ${{ runner.arch }} | |
| cache-key-suffix: ${{ hashFiles('.github/workflows/integration-tests.yml', 'crates/pop-chains/src/up/mod.rs', 'crates/pop-common/src/test_env.rs') }} | |
| - name: Run integration tests | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| cargo nextest run \ | |
| --release \ | |
| --locked \ | |
| -p pop-chains \ | |
| --features integration-tests \ | |
| --test chain \ | |
| --test metadata \ | |
| -j 8 \ | |
| --no-fail-fast \ | |
| --nocapture \ | |
| --status-level all | |
| pop-cli-integration-tests: | |
| needs: lint | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Free up space on runner (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: ./.github/actions/free-up-space | |
| - name: Setup Rust toolchain | |
| uses: ./.github/actions/setup-rust-stable-wasm | |
| with: | |
| components: rust-src | |
| - name: Rust Cache Linux | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: true | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| shared-key: pop-cache | |
| - name: Rust Cache MacOS | |
| if: matrix.os == 'macos-latest' | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: true | |
| shared-key: pop-cache | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Install protobuf compiler | |
| uses: ./.github/actions/install-protobuf | |
| with: | |
| runner-os: ${{ runner.os }} | |
| - name: Ensure Docker is running (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: ./.github/actions/ensure-docker | |
| - name: Install cargo-nextest | |
| uses: ./.github/actions/install-nextest | |
| - name: Cache pop binaries | |
| uses: ./.github/actions/cache-pop-binaries | |
| with: | |
| runner-os: ${{ matrix.os }} | |
| runner-arch: ${{ runner.arch }} | |
| cache-key-suffix: ${{ hashFiles('.github/workflows/integration-tests.yml', 'crates/pop-chains/src/up/mod.rs', 'crates/pop-common/src/test_env.rs') }} | |
| - name: Run pop-cli integration tests | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| extra_nextest_args=() | |
| if [[ "${{ matrix.os }}" == "macos-latest" ]]; then | |
| extra_nextest_args=(-- --skip verifiable_contract_lifecycle) | |
| fi | |
| cargo nextest run \ | |
| --release \ | |
| --locked \ | |
| --no-default-features \ | |
| --features "chain,contract,integration-tests" \ | |
| -p pop-cli \ | |
| --test contract \ | |
| --test chain \ | |
| --test fork \ | |
| -j 8 \ | |
| --no-fail-fast \ | |
| --nocapture \ | |
| --status-level all \ | |
| "${extra_nextest_args[@]}" |