|
| 1 | +name: Fhevm Test Suite E2E Tests |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + core_version: |
| 7 | + description: "KMS Core Version" |
| 8 | + required: true |
| 9 | + default: "" |
| 10 | + type: string |
| 11 | + connector_version: |
| 12 | + description: "Connector Version" |
| 13 | + required: true |
| 14 | + default: "" |
| 15 | + type: string |
| 16 | + coprocessor_version: |
| 17 | + description: "Coprocessor Image Version" |
| 18 | + required: true |
| 19 | + default: "" |
| 20 | + type: string |
| 21 | + db_migration_version: |
| 22 | + description: "Coprocessor DB Migration Image Version" |
| 23 | + required: true |
| 24 | + default: "" |
| 25 | + type: string |
| 26 | + host_version: |
| 27 | + description: "Host Image Version" |
| 28 | + required: false |
| 29 | + default: "" |
| 30 | + type: string |
| 31 | + gateway_version: |
| 32 | + description: "Gateway Image Version" |
| 33 | + required: false |
| 34 | + default: "" |
| 35 | + type: string |
| 36 | + relayer_version: |
| 37 | + description: "Relayer Image Version" |
| 38 | + required: true |
| 39 | + default: "" |
| 40 | + type: string |
| 41 | + test_suite_version: |
| 42 | + description: "Test Suite E2E Image Version" |
| 43 | + required: true |
| 44 | + default: "" |
| 45 | + type: string |
| 46 | + pull_request: |
| 47 | + |
| 48 | +concurrency: |
| 49 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 50 | + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
| 51 | + |
| 52 | +jobs: |
| 53 | + check-changes: |
| 54 | + permissions: |
| 55 | + actions: 'read' |
| 56 | + contents: 'read' |
| 57 | + pull-requests: 'read' |
| 58 | + runs-on: ubuntu-latest |
| 59 | + outputs: |
| 60 | + changes-fhevm: ${{ steps.filter.outputs.fhevm }} |
| 61 | + steps: |
| 62 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 63 | + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 |
| 64 | + id: filter |
| 65 | + with: |
| 66 | + filters: | |
| 67 | + fhevm: |
| 68 | + - 'test-suite/fhevm/**' |
| 69 | + fhevm-e2e-test: |
| 70 | + needs: check-changes |
| 71 | + if: ${{ needs.check-changes.outputs.changes-fhevm == 'true' || github.event_name == 'release' }} |
| 72 | + permissions: |
| 73 | + contents: "read" |
| 74 | + id-token: "write" |
| 75 | + packages: "read" |
| 76 | + |
| 77 | + runs-on: large_ubuntu_32 |
| 78 | + steps: |
| 79 | + - name: Checkout code |
| 80 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 81 | + |
| 82 | + - name: Setup Docker |
| 83 | + uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 |
| 84 | + |
| 85 | + - name: Login to GitHub Container Registry |
| 86 | + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 |
| 87 | + with: |
| 88 | + registry: ghcr.io |
| 89 | + username: ${{ github.actor }} |
| 90 | + password: ${{ secrets.GHCR_READ_TOKEN }} |
| 91 | + |
| 92 | + - name: Deploy fhevm Stack |
| 93 | + working-directory: fhevm |
| 94 | + env: |
| 95 | + CORE_VERSION: ${{ inputs.core_version }} |
| 96 | + CONNECTOR_VERSION: ${{ inputs.connector_version }} |
| 97 | + COPROCESSOR_VERSION: ${{ inputs.coprocessor_version }} |
| 98 | + DB_MIGRATION_VERSION: ${{ inputs.db_migration_version }} |
| 99 | + HOST_VERSION: ${{ inputs.host_version }} |
| 100 | + GATEWAY_VERSION: ${{ inputs.gateway_version }} |
| 101 | + RELAYER_VERSION: ${{ inputs.relayer_version }} |
| 102 | + TEST_SUITE_VERSION: ${{ inputs.test_suite_version }} |
| 103 | + run: | |
| 104 | + ./fhevm-cli deploy |
| 105 | +
|
| 106 | + - name: Input proof test (uint64) |
| 107 | + working-directory: fhevm |
| 108 | + run: | |
| 109 | + ./fhevm-cli test input-proof |
| 110 | +
|
| 111 | + - name: Public Decryption test |
| 112 | + working-directory: fhevm |
| 113 | + run: | |
| 114 | + ./fhevm-cli test public-decryption |
| 115 | +
|
| 116 | + - name: User Decryption test |
| 117 | + working-directory: fhevm |
| 118 | + run: | |
| 119 | + ./fhevm-cli test user-decryption |
| 120 | +
|
| 121 | + - name: ERC20 test |
| 122 | + working-directory: fhevm |
| 123 | + run: | |
| 124 | + ./fhevm-cli test erc20 |
| 125 | +
|
| 126 | + - name: Public Decryption HTTP endpoint test (ebool) |
| 127 | + working-directory: fhevm |
| 128 | + run: | |
| 129 | + ./fhevm-cli test public-decrypt-http-ebool |
| 130 | +
|
| 131 | + - name: Public Decryption HTTP endpoint test (mixed) |
| 132 | + working-directory: fhevm |
| 133 | + run: | |
| 134 | + ./fhevm-cli test public-decrypt-http-mixed |
| 135 | +
|
| 136 | + - name: Show logs on test failure |
| 137 | + working-directory: fhevm |
| 138 | + if: always() |
| 139 | + run: | |
| 140 | + echo "::group::Relayer Logs" |
| 141 | + ./fhevm-cli logs relayer |
| 142 | + echo "::endgroup::" |
| 143 | + echo "::group::SNS Worker Logs" |
| 144 | + ./fhevm-cli logs sns-worker | grep -v "Selected 0 rows to process" |
| 145 | + echo "::endgroup::" |
| 146 | + echo "::group::Transaction Sender Logs (filtered)" |
| 147 | + ./fhevm-cli logs transaction-sender | grep -v "Selected 0 rows to process" |
| 148 | + echo "::endgroup::" |
| 149 | +
|
| 150 | + - name: Cleanup |
| 151 | + working-directory: fhevm |
| 152 | + if: always() |
| 153 | + run: | |
| 154 | + ./fhevm-cli clean |
0 commit comments