Skip to content

Commit b46cd1b

Browse files
authored
feat(test-suite): update codegen for operators by removing FHE privKey (#64)
* feat(test-suite): updated codegen for operators test by removing FHE private key usage * chore(test-suite): update docker image hash for test-suite * chore(test-suite): add workflow for testing operators in github action
1 parent 681652d commit b46cd1b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+30968
-13776
lines changed
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Test Suite E2E Operators
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+
47+
concurrency:
48+
group: ${{ github.workflow }}-${{ github.ref }}
49+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
50+
51+
jobs:
52+
operators-e2e-test:
53+
if: ${{ github.event_name == 'workflow_dispatch' }}
54+
permissions:
55+
contents: "read"
56+
id-token: "write"
57+
packages: "read"
58+
59+
runs-on: large_ubuntu_32
60+
steps:
61+
- name: Checkout code
62+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
63+
64+
- name: Setup Docker
65+
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
66+
67+
- name: Login to GitHub Container Registry
68+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
69+
with:
70+
registry: ghcr.io
71+
username: ${{ github.actor }}
72+
password: ${{ secrets.GHCR_READ_TOKEN }}
73+
74+
- name: Deploy fhevm Stack
75+
working-directory: test-suite/fhevm
76+
env:
77+
CORE_VERSION: ${{ inputs.core_version }}
78+
CONNECTOR_VERSION: ${{ inputs.connector_version }}
79+
COPROCESSOR_VERSION: ${{ inputs.coprocessor_version }}
80+
DB_MIGRATION_VERSION: ${{ inputs.db_migration_version }}
81+
HOST_VERSION: ${{ inputs.host_version }}
82+
GATEWAY_VERSION: ${{ inputs.gateway_version }}
83+
RELAYER_VERSION: ${{ inputs.relayer_version }}
84+
TEST_SUITE_VERSION: ${{ inputs.test_suite_version }}
85+
run: |
86+
./fhevm-cli deploy
87+
88+
- name: All operators tests
89+
working-directory: test-suite/fhevm
90+
run: |
91+
./fhevm-cli test operators
92+
93+
- name: Show logs on test failure
94+
working-directory: test-suite/fhevm
95+
if: always()
96+
run: |
97+
echo "::group::Relayer Logs"
98+
./fhevm-cli logs relayer
99+
echo "::endgroup::"
100+
echo "::group::SNS Worker Logs"
101+
./fhevm-cli logs sns-worker | grep -v "Selected 0 rows to process"
102+
echo "::endgroup::"
103+
echo "::group::Transaction Sender Logs (filtered)"
104+
./fhevm-cli logs transaction-sender | grep -v "Selected 0 rows to process"
105+
echo "::endgroup::"
106+
107+
- name: Cleanup
108+
working-directory: test-suite/fhevm
109+
if: always()
110+
run: |
111+
./fhevm-cli clean

test-suite/e2e/.prettierrc.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"printWidth": 120,
3+
"plugins": ["@trivago/prettier-plugin-sort-imports", "prettier-plugin-solidity"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", ".js", ".cjs"],
7+
"options": {
8+
"singleQuote": true,
9+
"importOrder": ["<THIRD_PARTY_MODULES>", "^[./]"],
10+
"importOrderParserPlugins": ["typescript"],
11+
"importOrderSeparation": true,
12+
"importOrderSortSpecifiers": true
13+
}
14+
},
15+
{
16+
"files": "*.sol",
17+
"options": {
18+
"singleQuote": false
19+
}
20+
}
21+
]
22+
}

0 commit comments

Comments
 (0)