ci: re-enable cdk e2e tests #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
workflow_dispatch: {} | |
jobs: | |
cdk-e2e-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
e2e-group: | |
- "fork9-validium" | |
- "fork11-rollup" | |
- "fork12-validium" | |
- "fork12-rollup" | |
- "fork12-pessimistic" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22.x | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# This step will only execute if the necessary secrets are available, preventing failures | |
# on pull requests from forked repositories. | |
if: ${{ env.DOCKERHUB_USERNAME && env.DOCKERHUB_TOKEN }} | |
env: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Install Kurtosis CDK tools | |
uses: ./.github/actions/setup-kurtosis-cdk | |
- name: Install polycli | |
run: | | |
POLYCLI_VERSION="${{ vars.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 | |
- name: Checkout cdk repository | |
uses: actions/checkout@v4 | |
with: | |
repository: 0xPolygon/cdk | |
path: cdk | |
ref: a642291 # https://github.com/0xPolygon/cdk/commit/a6422912423e05f8 | |
- name: Build cdk image | |
run: make build-docker | |
- name: Setup bats | |
uses: bats-core/[email protected] | |
- name: Run e2e tests | |
run: make test-e2e-${{ matrix.e2e-group }} | |
working-directory: test | |
env: | |
KURTOSIS_FOLDER: ${{ github.workspace }}/kurtosis-cdk | |
BATS_LIB_PATH: /usr/lib/ | |
agglayer_prover_sp1_key: ${{ secrets.SP1_PRIVATE_KEY }} | |
- name: Dump enclave logs | |
if: failure() | |
run: kurtosis dump ./dump | |
- name: Generate archive name | |
if: failure() | |
run: | | |
archive_name="dump_run_with_args_${{matrix.e2e-group}}_${{ github.run_id }}" | |
echo "ARCHIVE_NAME=${archive_name}" >> "$GITHUB_ENV" | |
echo "Generated archive name: ${archive_name}" | |
kurtosis service exec cdk cdk-node-001 'cat /etc/cdk/cdk-node-config.toml' > ./dump/cdk-node-config.toml | |
- name: Upload logs | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.ARCHIVE_NAME }} | |
path: ./dump |