-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1b9595
commit 2402132
Showing
5 changed files
with
199 additions
and
176 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build CDK Image | ||
on: | ||
workflow_call: | ||
inputs: | ||
go-version: | ||
required: true | ||
type: string | ||
docker-image-name: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build-cdk-image: | ||
runs-on: amd-runner-2204 | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ inputs.go-version }} | ||
|
||
- name: Build CDK Docker Image | ||
run: make build-docker | ||
|
||
- name: Save CDK Image to Archive | ||
run: docker save --output /tmp/${{ inputs.docker-image-name }}.tar ${{ inputs.docker-image-name }} | ||
|
||
- name: Upload CDK Archive | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.docker-image-name }} | ||
path: /tmp/${{ inputs.docker-image-name }}.tar |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Test E2E (multi chains) | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
build-cdk-image: | ||
uses: ./.github/workflows/build-cdk-image.yml | ||
with: | ||
go-version: 1.22.x | ||
docker-image-name: cdk | ||
|
||
test-e2e: | ||
needs: build-cdk-image | ||
runs-on: amd-runner-2204 | ||
timeout-minutes: 30 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
e2e-group: | ||
- fork12-multi-pessimistic | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22.x | ||
|
||
- name: Build Tools | ||
run: make build-tools | ||
|
||
- name: Checkout kurtosis-cdk | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 0xPolygon/kurtosis-cdk | ||
path: kurtosis-cdk | ||
ref: v0.2.27 | ||
|
||
- name: Install Kurtosis CDK tools | ||
uses: ./kurtosis-cdk/.github/actions/setup-kurtosis-cdk | ||
|
||
- name: Setup Bats and bats libs | ||
uses: bats-core/[email protected] | ||
|
||
- 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-fork12-multi-pessimistic | ||
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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
|
||
name: Test E2E (single chain) | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
build-cdk-image: | ||
uses: ./.github/workflows/build-cdk-image.yml | ||
with: | ||
go-version: 1.22.x | ||
docker-image-name: cdk | ||
|
||
test-e2e: | ||
needs: build-cdk-image | ||
runs-on: amd-runner-2204 | ||
timeout-minutes: 30 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
e2e-group: | ||
- fork12-pessimistic | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Checkout kurtosis-cdk | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 0xPolygon/kurtosis-cdk | ||
path: kurtosis-cdk | ||
ref: v0.2.27 | ||
|
||
- name: Install Kurtosis CDK tools | ||
uses: ./kurtosis-cdk/.github/actions/setup-kurtosis-cdk | ||
|
||
- name: Setup Bats and bats libs | ||
uses: bats-core/[email protected] | ||
|
||
- 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 |
This file was deleted.
Oops, something went wrong.
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