|
| 1 | +name: Stateless Sync Tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - 'master' |
| 7 | + - 'develop' |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - 'master' |
| 11 | + - 'develop' |
| 12 | + types: [opened, synchronize] |
| 13 | + |
| 14 | +concurrency: |
| 15 | + group: stateless-sync-${{ github.event.pull_request.number || github.ref }} |
| 16 | + cancel-in-progress: true |
| 17 | + |
| 18 | +env: |
| 19 | + ENCLAVE_NAME: kurtosis-stateless-e2e |
| 20 | + |
| 21 | +jobs: |
| 22 | + e2e-tests: |
| 23 | + name: E2E Tests |
| 24 | + runs-on: ubuntu-latest |
| 25 | + timeout-minutes: 45 |
| 26 | + |
| 27 | + steps: |
| 28 | + # This is needed because the job fails with "System.IO.IOException: No space left on device". |
| 29 | + - name: Free disk space |
| 30 | + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 2023/10/19 |
| 31 | + with: |
| 32 | + tool-cache: true |
| 33 | + |
| 34 | + - name: Install dependencies on Linux |
| 35 | + if: runner.os == 'Linux' |
| 36 | + run: sudo apt update && sudo apt install build-essential |
| 37 | + |
| 38 | + - name: Checkout bor |
| 39 | + uses: actions/checkout@v5 |
| 40 | + with: |
| 41 | + path: bor |
| 42 | + |
| 43 | + - name: Checkout heimdall-v2 |
| 44 | + uses: actions/checkout@v5 |
| 45 | + with: |
| 46 | + repository: 0xPolygon/heimdall-v2 |
| 47 | + ref: develop |
| 48 | + path: heimdall-v2 |
| 49 | + |
| 50 | + - name: Checkout pos-workflows |
| 51 | + uses: actions/checkout@v5 |
| 52 | + with: |
| 53 | + repository: 0xPolygon/pos-workflows |
| 54 | + ref: main |
| 55 | + path: pos-workflows |
| 56 | + |
| 57 | + - name: Checkout kurtosis-pos |
| 58 | + uses: actions/checkout@v5 |
| 59 | + with: |
| 60 | + repository: 0xPolygon/kurtosis-pos |
| 61 | + ref: stateless |
| 62 | + path: kurtosis-pos |
| 63 | + |
| 64 | + - name: Pre kurtosis run |
| 65 | + uses: ./pos-workflows/.github/actions/kurtosis-pre-run |
| 66 | + with: |
| 67 | + docker_username: ${{ secrets.DOCKERHUB }} |
| 68 | + docker_token: ${{ secrets.DOCKERHUB_KEY }} |
| 69 | + |
| 70 | + - name: Build bor docker image |
| 71 | + run: | |
| 72 | + cd bor |
| 73 | + docker build -t bor:local --file Dockerfile . |
| 74 | +
|
| 75 | + - name: Build heimdall-v2 docker image |
| 76 | + run: | |
| 77 | + cd heimdall-v2 |
| 78 | + docker build -t heimdall-v2:local --file Dockerfile . |
| 79 | +
|
| 80 | + - name: Copy kurtosis config |
| 81 | + run: cp ./pos-workflows/.github/configs/kurtosis-stateless-e2e.yml ./kurtosis-pos/kurtosis-stateless-e2e.yml |
| 82 | + |
| 83 | + - name: Kurtosis run |
| 84 | + run: | |
| 85 | + cd kurtosis-pos |
| 86 | + kurtosis run --args-file=kurtosis-stateless-e2e.yml --enclave ${{ env.ENCLAVE_NAME }} . |
| 87 | +
|
| 88 | + - name: Inspect enclave |
| 89 | + run: kurtosis enclave inspect ${{ env.ENCLAVE_NAME }} |
| 90 | + |
| 91 | + - name: Run stateless sync tests |
| 92 | + run: | |
| 93 | + cd pos-workflows |
| 94 | + bash tests/stateless_tests/kurtosis_stateless_test.sh |
| 95 | +
|
| 96 | + - name: Test state syncs (post VeBlop HF) |
| 97 | + run: kurtosis service exec ${{ env.ENCLAVE_NAME }} test-runner "bats --filter 'bridge MATIC/POL, ERC20, and ERC721 from L1 to L2 and confirm L2 balances increased' tests/pos/bridge.bats" |
| 98 | + |
| 99 | + - name: Post kurtosis run |
| 100 | + if: always() |
| 101 | + uses: ./pos-workflows/.github/actions/kurtosis-post-run |
| 102 | + with: |
| 103 | + enclave_name: ${{ env.ENCLAVE_NAME }} |
0 commit comments