Add encrypted todo list smart contract example #4394
This file contains hidden or 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-suite-e2e-tests | |
| # Github does not support more than 10 inputs for workflow_dispatch: | |
| # https://docs.github.com/en/actions/reference/events-that-trigger-workflows#providing-inputs | |
| # Core, relayer and test-suite will use the default versions defined in the `fhevm-cli` script | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| connector_version: | |
| description: "Connector Version" | |
| default: "" | |
| type: string | |
| db_migration_version: | |
| description: "Coprocessor DB Migration Image Version" | |
| default: "" | |
| type: string | |
| host_version: | |
| description: "Host Image Version" | |
| default: "" | |
| type: string | |
| gateway_version: | |
| description: "Gateway Image Version" | |
| required: false | |
| default: "" | |
| type: string | |
| host_listener_version: | |
| description: "Host Listener Image Version" | |
| default: "" | |
| type: string | |
| gateway_listener_version: | |
| description: "Gateway Listener Image Version" | |
| default: "" | |
| type: string | |
| tx_sender_version: | |
| description: "Transaction Sender Image Version" | |
| default: "" | |
| type: string | |
| tfhe_worker_version: | |
| description: "TFHE Worker Image Version" | |
| default: "" | |
| type: string | |
| sns_worker_version: | |
| description: "SNS Worker Image Version" | |
| default: "" | |
| type: string | |
| zkproof_worker_version: | |
| description: "ZKProof Worker Image Version" | |
| default: "" | |
| type: string | |
| pull_request: | |
| branches: | |
| - main | |
| - release/* | |
| permissions: {} | |
| # Allow to run multiple instances of the same workflow in parallel when triggered manually | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'workflow_dispatch' && github.run_id || 'auto' }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| check-changes: | |
| name: test-suite-e2e-tests/check-changes | |
| permissions: | |
| actions: 'read' # Required to read workflow run information | |
| contents: 'read' # Required to checkout repository code | |
| pull-requests: 'read' # Required to read pull request information | |
| runs-on: ubuntu-latest | |
| outputs: | |
| changes-fhevm: ${{ steps.filter.outputs.fhevm }} | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: 'false' | |
| - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: filter | |
| with: | |
| filters: | | |
| fhevm: | |
| - 'test-suite/fhevm/**' | |
| fhevm-e2e-test: | |
| name: test-suite-e2e-tests/fhevm-e2e-test (bpr) | |
| needs: check-changes | |
| if: ${{ needs.check-changes.outputs.changes-fhevm == 'true' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'mergify/merge-queue/') }} | |
| permissions: | |
| contents: 'read' # Required to checkout repository code | |
| id-token: 'write' # Required for OIDC authentication | |
| packages: 'read' # Required to read GitHub packages/container registry | |
| runs-on: large_ubuntu_32 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: 'false' | |
| - name: Setup Docker | |
| uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GHCR_READ_TOKEN }} | |
| - name: Login to Chainguard Registry | |
| uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
| with: | |
| registry: cgr.dev | |
| username: ${{ secrets.CGR_USERNAME }} | |
| password: ${{ secrets.CGR_PASSWORD }} | |
| - name: Set version from release | |
| if: github.event_name == 'release' | |
| run: | | |
| { | |
| echo "CONNECTOR_DB_MIGRATION_VERSION=${GH_REF_NAME}" | |
| echo "CONNECTOR_GW_LISTENER_VERSION=${GH_REF_NAME}" | |
| echo "CONNECTOR_KMS_WORKER_VERSION=${GH_REF_NAME}" | |
| echo "CONNECTOR_TX_SENDER_VERSION=${GH_REF_NAME}" | |
| echo "DB_MIGRATION_VERSION=${GH_REF_NAME}" | |
| echo "GATEWAY_VERSION=${GH_REF_NAME}" | |
| echo "HOST_VERSION=${GH_REF_NAME}" | |
| echo "HOST_LISTENER_VERSION=${GH_REF_NAME}" | |
| echo "GW_LISTENER_VERSION=${GH_REF_NAME}" | |
| echo "TX_SENDER_VERSION=${GH_REF_NAME}" | |
| echo "TFHE_WORKER_VERSION=${GH_REF_NAME}" | |
| echo "SNS_WORKER_VERSION=${GH_REF_NAME}" | |
| echo "ZKPROOF_WORKER_VERSION=${GH_REF_NAME}" | |
| } >> "$GITHUB_ENV" | |
| env: | |
| GH_REF_NAME: ${{ github.ref_name }} | |
| - name: Deploy fhevm Stack | |
| working-directory: test-suite/fhevm | |
| env: | |
| CONNECTOR_DB_MIGRATION_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.connector_version || env.CONNECTOR_DB_MIGRATION_VERSION }} | |
| CONNECTOR_GW_LISTENER_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.connector_version || env.CONNECTOR_GW_LISTENER_VERSION }} | |
| CONNECTOR_KMS_WORKER_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.connector_version || env.CONNECTOR_KMS_WORKER_VERSION }} | |
| CONNECTOR_TX_SENDER_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.connector_version || env.CONNECTOR_TX_SENDER_VERSION }} | |
| DB_MIGRATION_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.db_migration_version || env.DB_MIGRATION_VERSION }} | |
| GATEWAY_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.gateway_version || env.GATEWAY_VERSION }} | |
| HOST_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.host_version || env.HOST_VERSION }} | |
| HOST_LISTENER_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.host_listener_version || env.HOST_LISTENER_VERSION }} | |
| GW_LISTENER_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.gateway_listener_version || env.GW_LISTENER_VERSION }} | |
| TX_SENDER_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.tx_sender_version || env.TX_SENDER_VERSION }} | |
| TFHE_WORKER_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.tfhe_worker_version || env.TFHE_WORKER_VERSION }} | |
| SNS_WORKER_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.sns_worker_version || env.SNS_WORKER_VERSION }} | |
| ZKPROOF_WORKER_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.zkproof_worker_version || env.ZKPROOF_WORKER_VERSION }} | |
| run: | | |
| ./fhevm-cli deploy | |
| - name: Input proof test (uint64) | |
| working-directory: test-suite/fhevm | |
| run: | | |
| ./fhevm-cli test input-proof | |
| - name: Public Decryption test | |
| working-directory: test-suite/fhevm | |
| run: | | |
| timeout 5m ./fhevm-cli test public-decryption | |
| - name: User Decryption test | |
| working-directory: test-suite/fhevm | |
| run: | | |
| ./fhevm-cli test user-decryption | |
| - name: ERC20 test | |
| working-directory: test-suite/fhevm | |
| run: | | |
| ./fhevm-cli test erc20 | |
| - name: Public Decryption HTTP endpoint test (ebool) | |
| working-directory: test-suite/fhevm | |
| run: | | |
| ./fhevm-cli test public-decrypt-http-ebool | |
| - name: Public Decryption HTTP endpoint test (mixed) | |
| working-directory: test-suite/fhevm | |
| run: | | |
| ./fhevm-cli test public-decrypt-http-mixed | |
| - name: Show logs on test failure | |
| working-directory: test-suite/fhevm | |
| if: always() | |
| run: | | |
| echo "::group::Relayer Logs" | |
| ./fhevm-cli logs fhevm-relayer | |
| echo "::endgroup::" | |
| echo "::group::SNS Worker Logs" | |
| ./fhevm-cli logs coprocessor-sns-worker | grep -v "Selected 0 rows to process" | |
| echo "::endgroup::" | |
| echo "::group::Transaction Sender Logs (filtered)" | |
| ./fhevm-cli logs coprocessor-transaction-sender | grep -v "Selected 0 rows to process" | |
| echo "::endgroup::" | |
| echo "::group::Host Listener" | |
| ./fhevm-cli logs coprocessor-host-listener | |
| echo "::endgroup::" | |
| echo "::group::Gateway Listener" | |
| ./fhevm-cli logs coprocessor-gw-listener | |
| echo "::endgroup::" | |
| - name: Cleanup | |
| working-directory: test-suite/fhevm | |
| if: always() | |
| run: | | |
| ./fhevm-cli clean |