test: IsGERInjected unit test #1986
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 e2e | |
on: | |
push: | |
branches: | |
- '**' | |
workflow_dispatch: {} | |
jobs: | |
build-cdk-image: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22.x | |
- name: Build cdk docker image | |
run: make build-docker | |
- name: Save cdk image to archive | |
run: docker save --output /tmp/cdk.tar cdk | |
- name: Upload archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cdk | |
path: /tmp/cdk.tar | |
test-e2e: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
needs: build-cdk-image | |
strategy: | |
fail-fast: false | |
matrix: | |
e2e-group: | |
- "fork9-validium" | |
- "fork11-rollup" | |
- "fork12-validium" | |
- "fork12-rollup" | |
- "fork12-pessimistic" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checkout kurtosis-cdk repository | |
uses: actions/checkout@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
env: | |
GOARCH: ${{ matrix.goarch }} | |
- name: Build Docker | |
run: make build-docker | |
- name: Checkout kurtosis-cdk | |
uses: actions/checkout@v4 | |
with: | |
repository: 0xPolygon/kurtosis-cdk | |
path: kurtosis-cdk | |
ref: v0.2.24 | |
- name: Install Kurtosis CDK tools | |
uses: ./kurtosis-cdk/.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: Setup Bats and bats libs | |
uses: bats-core/bats-action@2.0.0 | |
- name: Download cdk archive | |
uses: actions/download-artifact@v4 | |
with: | |
name: cdk | |
path: /tmp | |
- name: Load cdk image | |
run: | | |
docker load --input /tmp/cdk.tar | |
docker image ls -a | |
- 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 |