diff --git a/.github/actions/setup-kurtosis-cdk/action.yml b/.github/actions/setup-kurtosis-cdk/action.yml index 10c7ee655..baca58a5c 100644 --- a/.github/actions/setup-kurtosis-cdk/action.yml +++ b/.github/actions/setup-kurtosis-cdk/action.yml @@ -7,6 +7,10 @@ inputs: description: The version of kurtosis required: false default: '1.4.1' # https://github.com/kurtosis-tech/kurtosis/releases + polycli-version: + description: The version of polycli + required: false + default: 'v0.1.64' # https://github.com/0xPolygon/polygon-cli runs: using: "composite" @@ -38,3 +42,14 @@ runs: - name: Install foundry uses: foundry-rs/foundry-toolchain@v1 + + - name: Install polycli + shell: bash + run: | + polycli_version=${{ inputs.polycli-version }} + tmp_dir=$(mktemp -d) + curl -L "https://github.com/0xPolygon/polygon-cli/releases/download/${polycli_version}/polycli_${polycli_version}_linux_amd64.tar.gz" | tar -xz -C "$tmp_dir" + mv "$tmp_dir"/* /usr/local/bin/polycli + rm -rf "$tmp_dir" + sudo chmod +x /usr/local/bin/polycli + /usr/local/bin/polycli version diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 826688d8c..4ec32fc52 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -54,6 +54,21 @@ jobs: ./monitor-verified-batches.sh \ --enclave ${{ env.ENCLAVE_NAME }} \ --rpc-url $(kurtosis port print ${{ env.ENCLAVE_NAME }} cdk-erigon-rpc-001 rpc) + + # Run cdk e2e tests. + - name: Checkout cdk repository + uses: actions/checkout@v4 + with: + repository: 0xPolygon/cdk + path: cdk + ref: ${{ env.CDK_VERSION }} + - uses: bats-core/bats-action@3.0.0 + - name: Run cdk e2e tests + working-directory: cdk/test + run: bats . + env: + KURTOSIS_FOLDER: ${{ github.workspace }} + BATS_LIB_PATH: /usr/lib/ - name: Dump enclave if: ${{ !cancelled() }}